Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootBlocks = []RootBlock{ { Name: "agent", StructType: reflect.TypeOf(agent.Config{}), Desc: "The agent block configures the pull-mode collection of profiles.", }, { Name: "server", StructType: reflect.TypeOf(server.Config{}), Desc: "The server block configures the HTTP and gRPC server of the launched service(s).", }, { Name: "distributor", StructType: reflect.TypeOf(distributor.Config{}), Desc: "The distributor block configures the distributor.", }, { Name: "ingester", StructType: reflect.TypeOf(ingester.Config{}), Desc: "The ingester block configures the ingester.", }, { Name: "querier", StructType: reflect.TypeOf(querier.Config{}), Desc: "The querier block configures the querier.", }, { Name: "query_frontend", StructType: reflect.TypeOf(frontend.Config{}), Desc: "The query_frontend block configures the query-frontend.", }, { Name: "frontend_worker", StructType: reflect.TypeOf(worker.Config{}), Desc: "The frontend_worker block configures the frontend-worker.", }, { Name: "query_scheduler", StructType: reflect.TypeOf(scheduler.Config{}), Desc: "The query_scheduler block configures the query-scheduler.", }, { Name: "grpc_client", StructType: reflect.TypeOf(grpcclient.Config{}), Desc: "The grpc_client block configures the gRPC client used to communicate between two Phlare components.", }, { Name: "memberlist", StructType: reflect.TypeOf(memberlist.KVConfig{}), Desc: "The memberlist block configures the Gossip memberlist.", }, { Name: "s3_storage_backend", StructType: reflect.TypeOf(s3.Config{}), Desc: "The s3_backend block configures the connection to Amazon S3 object storage backend.", }, { Name: "gcs_storage_backend", StructType: reflect.TypeOf(gcs.Config{}), Desc: "The gcs_backend block configures the connection to Google Cloud Storage object storage backend.", }, { Name: "azure_storage_backend", StructType: reflect.TypeOf(azure.Config{}), Desc: "The azure_storage_backend block configures the connection to Azure object storage backend.", }, { Name: "swift_storage_backend", StructType: reflect.TypeOf(swift.Config{}), Desc: "The swift_storage_backend block configures the connection to OpenStack Object Storage (Swift) object storage backend.", }, { Name: "filesystem_storage_backend", StructType: reflect.TypeOf(filesystem.Config{}), Desc: "The filesystem_storage_backend block configures the usage of local file system as object storage backend.", }, }
RootBlocks is an ordered list of root blocks. The order is the same order that will follow the markdown generation.
Functions ¶
func FindFlagsPrefix ¶
func ReflectType ¶
Types ¶
type ConfigBlock ¶
type ConfigBlock struct { Name string Desc string Entries []*ConfigEntry FlagsPrefix string FlagsPrefixes []string }
func Config ¶
func Config(cfg interface{}, flags map[uintptr]*flag.Flag, rootBlocks []RootBlock) ([]*ConfigBlock, error)
Config returns a slice of ConfigBlocks. The first ConfigBlock is a recursively expanded cfg. The remaining entries in the slice are all (root or not) ConfigBlocks.
func (*ConfigBlock) Add ¶
func (b *ConfigBlock) Add(entry *ConfigEntry)
type ConfigEntry ¶
type ConfigEntry struct { Kind EntryKind Name string Required bool // In case the Kind is KindBlock Block *ConfigBlock BlockDesc string Root bool // In case the Kind is KindField FieldFlag string FieldDesc string FieldType string FieldDefault string FieldExample *FieldExample FieldCategory string // In case the Kind is KindMap or KindSlice Element *ConfigBlock }
func (ConfigEntry) Description ¶
func (e ConfigEntry) Description() string
type ExamplerConfig ¶
type ExamplerConfig interface {
ExampleDoc() (comment string, yaml interface{})
}
ExamplerConfig can be implemented by configs to provide examples. If string is non-empty, it will be added as comment. If yaml value is non-empty, it will be marshaled as yaml under the same key as it would appear in config.
type FieldExample ¶
type FieldExample struct { Comment string Yaml interface{} }
Click to show internal directories.
Click to hide internal directories.