Skip to content

Commit

Permalink
expose stability level to components
Browse files Browse the repository at this point in the history
  • Loading branch information
wildum committed May 14, 2024
1 parent 12fb273 commit bc090eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/alloy/internal/controller/node_builtin_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ func getManagedOptions(globals ComponentGlobals, cn *BuiltinComponentNode) compo
GetServiceData: func(name string) (interface{}, error) {
return globals.GetServiceData(name)
},

MinStability: globals.MinStability,
}
}

Expand Down
3 changes: 3 additions & 0 deletions internal/component/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ type Options struct {
// The result of GetServiceData may be cached as the value will not change at
// runtime.
GetServiceData func(name string) (interface{}, error)

// Minimum allowed stability level for features
MinStability featuregate.Stability
}

// Registration describes a single component.
Expand Down

0 comments on commit bc090eb

Please sign in to comment.