relay

package
v0.0.0-...-af13ce4 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAgentAPIServer

func NewAgentAPIServer(ctrl Controller) *agentApiServer

func NewClientAPIServer

func NewClientAPIServer(ctrl Controller) *clientApiServer

Types

type Controller

type Controller interface {
	AgentConnected(ctx context.Context, an *api.Announcement, client api.InstructionClient)
	ClientConnected(ctx context.Context, clientKey ssh.PublicKey)
	Watch(ctx context.Context, clientKey ssh.PublicKey, req *api.WatchRequest) (<-chan *api.Announcement, error)
	Lookup(ctx context.Context, fingerprint string) (api.InstructionClient, error)
}

func NewController

func NewController() Controller

type RelayServerOption

type RelayServerOption func(*RelayServerOptions)

func Insecure

func Insecure(insecure bool) RelayServerOption

func ListenAddress

func ListenAddress(addr string) RelayServerOption

func ServingCerts

func ServingCerts(cert, key string) RelayServerOption

type RelayServerOptions

type RelayServerOptions struct {
	// contains filtered or unexported fields
}

func (*RelayServerOptions) Apply

func (o *RelayServerOptions) Apply(opts ...RelayServerOption)

type Server

type Server struct {
	api.UnimplementedRelayServer
	// contains filtered or unexported fields
}

func NewRelayServer

func NewRelayServer(opts ...RelayServerOption) *Server

func (*Server) AgentStream

func (rs *Server) AgentStream(stream api.Relay_AgentStreamServer) error

func (*Server) ClientStream

func (rs *Server) ClientStream(stream api.Relay_ClientStreamServer) error

func (*Server) Serve

func (rs *Server) Serve(ctx context.Context) error

Jump to

Keyboard shortcuts

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