Documentation ¶
Index ¶
- Constants
- func DefaultCertificate() (*tls.Certificate, error)
- func KeyPair(domain string, expiration time.Time) ([]byte, []byte, error)
- func PemCert(privKey *rsa.PrivateKey, domain string, expiration time.Time) ([]byte, error)
- type Client
- func (c *Client) GetAgentReachableIP(ctx context.Context) (string, error)
- func (c *Client) GetMetrics(ctx context.Context) ([]*dto.MetricFamily, error)
- func (c *Client) GetProviderState(ctx context.Context) (ProviderState, error)
- func (c *Client) PushDynamic(ctx context.Context, unixNano int64, cfg *dynamic.Configuration) error
- type ProviderState
Constants ¶
View Source
const DefaultDomain = "TRAEFIK HUB AGENT DEFAULT CERT"
DefaultDomain Traefik domain for the default certificate.
Variables ¶
This section is empty.
Functions ¶
func DefaultCertificate ¶
func DefaultCertificate() (*tls.Certificate, error)
DefaultCertificate generates random TLS certificates.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client allows interacting with a Traefik instance.
func (*Client) GetAgentReachableIP ¶
GetAgentReachableIP returns an IP address the Hub provider can reach the Agent from.
func (*Client) GetMetrics ¶
GetMetrics returns the Traefik metrics.
func (*Client) GetProviderState ¶
func (c *Client) GetProviderState(ctx context.Context) (ProviderState, error)
GetProviderState returns the current ProviderState.
func (*Client) PushDynamic ¶
PushDynamic pushes a dynamic configuration.
type ProviderState ¶
type ProviderState struct {
LastConfigUnixNano int64 `json:"lastConfigUnixNano"`
}
ProviderState is the state of a Hub provider.
Click to show internal directories.
Click to hide internal directories.