Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertsConsumer ¶ added in v0.3.0
type CertsConsumer interface {
SetPeerCertificates(parsedCertData *tls.ParsedCertData, rawCertData *tls.RawCertData) error
}
CertsConsumer represents a consumer of peer TLS certificates.
type CertsWatcher ¶ added in v0.3.0
type CertsWatcher struct {
// contains filtered or unexported fields
}
CertsWatcher watches certificate updates.
func NewWatcher ¶ added in v0.3.0
func NewWatcher(caPath, certPath, keyPath string) *CertsWatcher
NewWatcher returns a new certificate files watcher.
func (*CertsWatcher) AddConsumer ¶ added in v0.3.0
func (w *CertsWatcher) AddConsumer(consumer CertsConsumer)
AddConsumer adds a new peer certificates consumer. This function is not thread-safe.
func (*CertsWatcher) GracefulStop ¶ added in v0.3.0
func (w *CertsWatcher) GracefulStop() error
GracefulStop does a graceful stop of the watcher.
func (*CertsWatcher) Name ¶ added in v0.3.0
func (w *CertsWatcher) Name() string
Name of the watcher.
func (*CertsWatcher) ReadCertsAndUpdateConsumers ¶ added in v0.3.0
func (w *CertsWatcher) ReadCertsAndUpdateConsumers() error
ReadCertsAndUpdateConsumers reads the peer certificates and updates the consumers.
func (*CertsWatcher) Start ¶ added in v0.3.0
func (w *CertsWatcher) Start() error
Start the certs watcher.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for accessing a remote peer.
func (*Client) Authorize ¶
func (c *Client) Authorize(req *api.AuthorizationRequest) (string, error)
Authorize a request for accessing a peer exported service, yielding an access token.
func (*Client) GetHeartbeat ¶
GetHeartbeat get a heartbeat from other peers.
type RemoteServerAuthorizationResponse ¶
type RemoteServerAuthorizationResponse struct { // ServiceExists is true if the requested service exists. ServiceExists bool // Allowed is true if the request is allowed. Allowed bool // AccessToken is a token that allows accessing the requested service. AccessToken string }
RemoteServerAuthorizationResponse represents an authorization response received from a remote controlplane server.