Documentation
¶
Overview ¶
Package alloycli is the entrypoint for Grafana Alloy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClusterService ¶ added in v1.8.0
func NewClusterService( opts ClusterOptions, getDiscoveryFn func(options discovery.Options) (discovery.DiscoverFn, error), ) (*cluster.Service, error)
NewClusterService is visible to make it easier to test clustering e2e.
func NewRunAsExtensionCommand ¶ added in v1.18.0
func NewRunAsExtensionCommand(params ExtensionModeParams) *cobra.Command
NewRunAsExtensionCommand returns a standalone cobra command to run Alloy inside OTel collector as an extension.
In extension mode:
- Certain features like remote config are disabled.
- Config reload on NOHUP signal is disabled.
- Alloy config contents passed directly, instead of file path cli argument.
func RunCommand ¶ added in v1.13.0
Types ¶
type ClusterOptions ¶ added in v1.8.0
type ClusterOptions struct {
Log *slog.Logger
Metrics prometheus.Registerer
Tracer trace.TracerProvider
EnableClustering bool
MinimumClusterSize int
MinimumSizeWaitTimeout time.Duration
NodeName string
AdvertiseAddress string
ListenAddress string
JoinPeers []string
DiscoverPeers string
RejoinInterval time.Duration
AdvertiseInterfaces []string
ClusterMaxJoinPeers int
ClusterName string
EnableTLS bool
TLSCAPath string
TLSCertPath string
TLSKeyPath string
TLSServerName string
}
type ExtensionModeParams ¶ added in v1.18.0
type ExtensionModeParams struct {
// ConfigContents is a set of config file names and contents.
Configs map[string][]byte
// ModulePath is a value that will be used as "module_path" keyword value in Alloy config.
ModulePath string
// OnConfigImport is a hook that is called when config files are imported using `import.*` components.
OnConfigImport importsource.ImportContentHook
}
Click to show internal directories.
Click to hide internal directories.