Documentation
¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the Apache v2.0 license.
Copyright (c) Microsoft Corporation. Licensed under the Apache v2.0 license.
Copyright (c) Microsoft Corporation. Licensed under the Apache v2.0 license.
Copyright (c) Microsoft Corporation. Licensed under the Apache v2.0 license.
Copyright (c) Microsoft Corporation. Licensed under the Apache v2.0 license.
Index ¶
- Constants
- type ConfigStore
- func (c *ConfigStore) Add(id string, val interface{}) error
- func (c *ConfigStore) Delete(id string) error
- func (c *ConfigStore) Get(id string) (*interface{}, error)
- func (c *ConfigStore) GetByName(name string) (*interface{}, error)
- func (c *ConfigStore) List() []interface{}
- func (c *ConfigStore) ListFilter(filterName, filterValue string) ([]interface{}, error)
- func (c *ConfigStore) ListFilterMany(filterName, filterValue string) ([]interface{}, error)
- func (c *ConfigStore) Save(id string) error
- type ConfigStoreManager
- type ConfigStoreParameters
- type EtcdEndpoint
Constants ¶
const (
RegistryPath = `SOFTWARE\Microsoft` // HKLM\SOFTWARE\Microsoft\
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigStore ¶
type ConfigStore struct {
// contains filtered or unexported fields
}
func (*ConfigStore) Add ¶
func (c *ConfigStore) Add(id string, val interface{}) error
Add object to the map and store.
func (*ConfigStore) Delete ¶
func (c *ConfigStore) Delete(id string) error
Delete removes an object from the map and store
func (*ConfigStore) Get ¶
func (c *ConfigStore) Get(id string) (*interface{}, error)
Get returns an object from the map.
func (*ConfigStore) GetByName ¶
func (c *ConfigStore) GetByName(name string) (*interface{}, error)
GetByName returns an object from the map, after finding the matching name.
Error if object is not found. Assumes 'Name' is unique.
func (*ConfigStore) List ¶
func (c *ConfigStore) List() []interface{}
List returns a list of every object in the map
func (*ConfigStore) ListFilter ¶
func (c *ConfigStore) ListFilter(filterName, filterValue string) ([]interface{}, error)
ListFilter returns a list of objects in the map, filtered by a name and value. Ex: ('Name','testNet') will return not found if no elements are found
func (*ConfigStore) ListFilterMany ¶
func (c *ConfigStore) ListFilterMany(filterName, filterValue string) ([]interface{}, error)
ListFilterMany returns a list of objects in the map, filtered by a name and value. Ex: ('Name','testNet') will return empty list, if no elements are found This method is used when filterValue is not empty, and we do not get any entities matching this filter in which case we do not need an error
func (*ConfigStore) Save ¶
func (c *ConfigStore) Save(id string) error
Save pushes a modified object in the map to the store. Note: Get and List return pointers to interfaces inside the internal data map.
Save takes the Id as a parameter. It is assumed that the interface was modified using the pointer.
type ConfigStoreManager ¶
type ConfigStoreManager struct {
// contains filtered or unexported fields
}
ConfigStoreManager handles giving out config stores and managing higher level operations
func GetConfigStoreManager ¶
func GetConfigStoreManager() *ConfigStoreManager
GetConfigStoreManager is called to retrieve a reference to the single config store manager instance
func (*ConfigStoreManager) NewConfigStore ¶
func (c *ConfigStoreManager) NewConfigStore(params ConfigStoreParameters) (*ConfigStore, []error)
NewConfigStore returns a new config store based on the given parameters and adds it to config store managers internal map of all known config stores
func (*ConfigStoreManager) SetEtcdCerts ¶
func (c *ConfigStoreManager) SetEtcdCerts(cert, key, ca string) error
SetEtcdCerts is called during the kubernetes bootstrap process to provide the necessary etcd certs for etcd store saving the certs and key into files is not the responsibility of this function
func (*ConfigStoreManager) SetEtcdEndpoint ¶
func (c *ConfigStoreManager) SetEtcdEndpoint(etcdEndpoint string) error
SetEtcdEndpoint is called during the kubernetes bootstrap process to provide the control plane endpoint that the etcd client will connect to
type ConfigStoreParameters ¶
type ConfigStoreParameters struct {
DataType reflect.Type // type of objects being stored
StoreType string // type of storage backend
// 'File' parameters
BasePath string // base path for file storage. ex: 'C:\ProgramData\WssdAgent'
// 'Registry' parameters
AgentName string // name of the agent, for appending to registry path. ex: HKLM\SOFTWARE\Microsoft\ + wssdagent
// 'Cluster-Registry' parameters (also uses AgentName)
ClusterResourceName string // name of the failover cluster registry resource corresponding to the agent service
}
type EtcdEndpoint ¶
type EtcdEndpoint struct {
Address string
}