Documentation ¶
Index ¶
Constants ¶
View Source
const (
// EnvProviderConfigPathsEnvKey holds config paths separated by comma.
EnvProviderConfigPathsEnvKey = "BOTKUBE_CONFIG_PATHS"
)
Variables ¶
This section is empty.
Functions ¶
func GetProvider ¶ added in v1.0.0
func GetProvider(remoteCfgSyncEnabled bool, deployClient DeploymentClient) config.Provider
GetProvider resolves and returns paths for config files. It reads them the 'BOTKUBE_CONFIG_PATHS' env variable. If not found, then it uses '--config' flag.
func RegisterFlags ¶ added in v1.0.0
RegisterFlags registers config related flags.
Types ¶
type DeploymentClient ¶ added in v1.0.0
type DeploymentClient interface {
GetConfigWithResourceVersion(ctx context.Context) (remote.Deployment, error)
}
type EnvProvider ¶
type EnvProvider struct { }
EnvProvider environment config source provider
func NewEnvProvider ¶
func NewEnvProvider() *EnvProvider
NewEnvProvider initializes new environment config source provider
type FileSystemProvider ¶
type FileSystemProvider struct {
Files []string
}
FileSystemProvider allows consumer to pass config files statically
func NewFileSystemProvider ¶
func NewFileSystemProvider(configs []string) *FileSystemProvider
NewFileSystemProvider initializes new static config source provider
type GqlProvider ¶
type GqlProvider struct {
// contains filtered or unexported fields
}
GqlProvider is GraphQL provider
func NewGqlProvider ¶
func NewGqlProvider(dc DeploymentClient) *GqlProvider
NewGqlProvider initializes new GraphQL config source provider
Source Files ¶
Click to show internal directories.
Click to hide internal directories.