Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client describes a very simple client for connecting to a daemon rest API The client expects that certificates are already existing and you can just pass the values through the constructor. All requests will be made over HTTPS, it's currently not possible to send any requests in an insecure, downgraded manor.
func NewUntrusted ¶
NewUntrusted creates a new Client used to connect to hosts in a untrusted manor.
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster represents a way of interacting with the daemon API, which is responsible for getting the cluster information from the daemon.
func (*Cluster) Info ¶
func (c *Cluster) Info() (ClusterInfo, error)
Info returns the cluster information
type ClusterCertInfo ¶
ClusterCertInfo is used for joining a cluster
type ClusterInfo ¶
type ClusterInfo struct { ServerName string `json:"server_name" yaml:"server_name"` Enabled bool `json:"enabled" yaml:"enabled"` }
ClusterInfo represents high-level information about the cluster.
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
Discovery represents a way of interacting with the daemon API, which is responsible for getting the discovery information from the daemon.
type Environment ¶
type Environment struct { Addresses []string `json:"addresses" yaml:"addresses"` Certificate string `json:"certificate" yaml:"certificate"` CertificateFingerprint string `json:"certificate_fingerprint" yaml:"certificate_fingerprint"` CertificateKey string `json:"certificate_key,omitempty" yaml:"certificate_key,omitempty"` Server string `json:"server" yaml:"server"` ServerPid int `json:"server_pid" yaml:"server_pid"` ServerVersion string `json:"server_version" yaml:"server_version"` ServerClustered bool `json:"server_clustered" yaml:"server_clustered"` ServerName string `json:"server_name" yaml:"server_name"` }
Environment defines the server environment for the daemon
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info represents a way of interacting with the daemon API, which is responsible for getting the information from the daemon.
func (*Info) Get ¶
func (i *Info) Get() (InfoResult, error)
Get returns the information from the daemon API
type InfoResult ¶
type InfoResult struct { Environment Environment `json:"environment" yaml:"environment"` Config map[string]interface{} `json:"config" yaml:"config"` }
InfoResult contains the result of querying the daemon information API
type Option ¶
type Option func(*options)
Option to be passed to Connect to customize the resulting instance.
func WithLogger ¶
WithLogger sets the logger on the option
type ServiceNode ¶
type ServiceNode struct { ServerName string `json:"server_name" yaml:"server_name"` ServerAddress string `json:"server_address" yaml:"server_address"` DaemonAddress string `json:"daemon_address" yaml:"daemon_address"` DaemonNonce string `json:"daemon_nonce" yaml:"daemon_nonce"` }
ServiceNode represents a request to update the node for the raft cluster
type ServiceResult ¶
type ServiceResult struct { ServiceNode `json:",inline" yaml:",inline"` Status string `json:"status" yaml:"status"` Message string `json:"message" yaml:"message"` }
ServiceResult represents a node part of the raft cluster
type Services ¶
type Services struct {
// contains filtered or unexported fields
}
Services represents a way of interacting with the daemon API, which is responsible for getting the discovery service information from the daemon.
func (*Services) Add ¶
func (s *Services) Add(nodes []ServiceNode) error
Add adds a service node to the discovery API
func (*Services) Delete ¶
func (s *Services) Delete(nodes []ServiceNode) error
Delete removes a service node to the discovery API
func (*Services) List ¶
func (s *Services) List() ([]ServiceResult, error)
List all the possible services that are attached to the discovery API