Documentation ¶
Index ¶
- Variables
- func ActiveProjects(c context.Context) ([]types.ProjectName, error)
- func ActiveUserProjects(c context.Context) ([]types.ProjectName, error)
- func ProjectConfig(c context.Context, project types.ProjectName) (*svcconfig.ProjectConfig, error)
- func ProjectConfigPath(c context.Context) string
- func ProjectNames(c context.Context, a cfgclient.Authority) ([]types.ProjectName, error)
- func ServiceConfigPath(c context.Context) (config.Set, string)
- type Config
- type Settings
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidConfig is returned when the configuration exists, but is invalid. ErrInvalidConfig = errors.New("invalid configuration") )
Functions ¶
func ActiveProjects ¶
func ActiveProjects(c context.Context) ([]types.ProjectName, error)
ActiveProjects returns a full list of all config service projects with LogDog project configurations.
The list will be alphabetically sorted.
func ActiveUserProjects ¶
func ActiveUserProjects(c context.Context) ([]types.ProjectName, error)
ActiveUserProjects returns a full list of all config service projects with LogDog project configurations that the current user can see.
The list will be alphabetically sorted.
func ProjectConfig ¶
func ProjectConfig(c context.Context, project types.ProjectName) (*svcconfig.ProjectConfig, error)
ProjectConfig loads the project config protobuf from the config service.
This function will return:
- nil, if the project exists and the configuration successfully loaded
- config.ErrNoConfig if the project configuration was not present.
- ErrInvalidConfig if the project configuration was present, but could not be loaded.
- Some other error if an error occurred that does not fit one of the previous categories.
func ProjectConfigPath ¶
ProjectConfigPath returns the path of the project-specific configuration. This path should be used with a project config set.
A given project's configuration is named after the current App ID.
func ProjectNames ¶
ProjectNames returns a sorted list of the names of all of the projects that the supplied authority can view.
Types ¶
type Config ¶
type Config struct { svcconfig.Config // Settings are per-instance settings. Settings Settings // ConfigServiceURL is the config service's URL. ConfigServiceURL url.URL `json:"-"` // ConfigSet is the name of the service config set that is being used. ConfigSet config.Set `json:"-"` // ServiceConfigPath is the path within ConfigSet of the service // configuration. ServiceConfigPath string `json:"-"` }
Config is the LogDog Coordinator service configuration.
type Settings ¶
type Settings struct { // BigTableServiceAccountJSON, if not empty, is the service account JSON file // data that will be used for BigTable access. // // TODO(dnj): Remove this option once Cloud BigTable has cross-project ACLs. BigTableServiceAccountJSON []byte `json:"bigTableServiceAccountJson"` }
Settings is the LogDog Coordinator auxiliary (runtime) settings. These are stored within a given datastore instance, rather than in luci-config, due to their sensitivity.
func (*Settings) Load ¶
Load populates the settings instance from the stored settings.
If no settings are stored, an empty Settings instance will be loaded and this will return nil.
An error will be returned if an operation that is expected to succeed fails.