server

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNewTerminalRefused = errors.New("refusing to register new terminal")

Functions

func HashedSecretField added in v0.9.0

func HashedSecretField(secret string) zap.Field

func HashedTokenField added in v0.9.0

func HashedTokenField(token string) zap.Field

func LocatorField added in v0.9.0

func LocatorField(locator string) zap.Field

Types

type LocatorGenerator

type LocatorGenerator func() string

type Option

type Option func(*TerminalServer)

func WithAddresses

func WithAddresses(addresses []string) Option

func WithGCPProjectID added in v0.9.0

func WithGCPProjectID(gcpProjectID string) Option

func WithLocatorGenerator

func WithLocatorGenerator(locatorGenerator LocatorGenerator) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

type TerminalServer

type TerminalServer struct {
	api.UnimplementedGuestServiceServer
	api.UnimplementedHostServiceServer
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*TerminalServer, error)

func (*TerminalServer) Addresses added in v0.9.0

func (ts *TerminalServer) Addresses() []string

func (*TerminalServer) ControlChannel

func (ts *TerminalServer) ControlChannel(channel api.HostService_ControlChannelServer) error

func (*TerminalServer) DataChannel

func (ts *TerminalServer) DataChannel(channel api.HostService_DataChannelServer) error

func (*TerminalServer) Run

func (ts *TerminalServer) Run(ctx context.Context) (err error)

func (*TerminalServer) TerminalChannel

func (ts *TerminalServer) TerminalChannel(channel api.GuestService_TerminalChannelServer) error

func (*TerminalServer) TraceContext added in v0.9.0

func (ts *TerminalServer) TraceContext(ctx context.Context) []zap.Field

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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