Documentation ¶
Index ¶
- type APIError
- type AccessControlConfig
- type Client
- func (c *Client) FetchTopology(ctx context.Context) (topology.Reference, error)
- func (c *Client) GetConfig(ctx context.Context) (Config, error)
- func (c *Client) Link(ctx context.Context) (clusterID string, err error)
- func (c *Client) PatchTopology(ctx context.Context, patch []byte, lastKnownVersion int64) (int64, error)
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) SetVersionStatus(ctx context.Context, status version.Status) error
- type Config
- type ConfigWatcher
- type MetricsConfig
- type TopologyConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessControlConfig ¶
type AccessControlConfig struct {
MaxSecuredRoutes int `json:"maxSecuredRoutes"`
}
AccessControlConfig holds the configuration of the access control section of the offer config.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client allows interacting with the cluster service.
func (*Client) FetchTopology ¶ added in v0.8.0
FetchTopology fetches the topology.
func (*Client) PatchTopology ¶ added in v0.8.0
func (c *Client) PatchTopology(ctx context.Context, patch []byte, lastKnownVersion int64) (int64, error)
PatchTopology submits a JSON Merge Patch to the platform containing the difference in the topology since its last synchronization. The last known topology version must be provided. This version can be obtained by calling the FetchTopology method.
type Config ¶
type Config struct { Metrics MetricsConfig `json:"metrics"` Topology TopologyConfig `json:"topology"` AccessControl AccessControlConfig `json:"accessControl"` }
Config holds the configuration of the agent.
type ConfigWatcher ¶
type ConfigWatcher struct {
// contains filtered or unexported fields
}
ConfigWatcher watches hub agent configuration.
func NewConfigWatcher ¶
func NewConfigWatcher(interval time.Duration, c *Client) *ConfigWatcher
NewConfigWatcher return a new ConfigWatcher.
func (*ConfigWatcher) AddListener ¶
func (w *ConfigWatcher) AddListener(listener func(cfg Config))
AddListener adds a listeners to the ConfigWatcher.
func (*ConfigWatcher) Run ¶
func (w *ConfigWatcher) Run(ctx context.Context)
Run runs ConfigWatcher.
type MetricsConfig ¶
type MetricsConfig struct { Interval time.Duration `json:"interval"` Tables []string `json:"tables"` }
MetricsConfig holds the metrics part of the agent config.
type TopologyConfig ¶
type TopologyConfig struct { GitProxyHost string `json:"gitProxyHost,omitempty"` GitOrgName string `json:"gitOrgName,omitempty"` GitRepoName string `json:"gitRepoName,omitempty"` }
TopologyConfig holds the topology part of the agent config.