peer

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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 for accessing a remote peer.

func NewClient

func NewClient(peer *v1alpha1.Peer, tlsConfig *tls.Config) *Client

NewClient returns a new Peer API client.

func (*Client) Authorize

Authorize a request for accessing a peer exported service, yielding an access token.

func (*Client) GetHeartbeat

func (c *Client) GetHeartbeat() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL