remoteaccess

package
v0.0.0-...-9d0ed1b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

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

Console contains resources involved in a remote console session.

func NewConsole

func NewConsole(ctx context.Context, rows, cols uint16) (*Console, error)

NewConsole creates a new console. It returns a Console object and an error if any. If err == nil, the caller is responsible for closing the Console.

func (*Console) Close

func (c *Console) Close()

Close the console and release all resources.

func (*Console) Resize

func (c *Console) Resize(rows, cols uint16) error

Resize the console.

type Service

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

Service controls remote access for the agent.

func New

func New() *Service

New creates a new instance of the remote access service.

func (*Service) HandleConsole

func (s *Service) HandleConsole(ctx context.Context, stream *smux.Stream, payload []byte) error

HandleConsole handles a remote console stream.

func (*Service) HandleConsoleCommand

func (s *Service) HandleConsoleCommand(_ context.Context, stream *smux.Stream, payload []byte) error

HandleConsoleCommand handles a remote console command. This is primary used to resize an existing console.

func (*Service) HandleReloadCommand

func (s *Service) HandleReloadCommand(_ context.Context, stream *smux.Stream, _ []byte) error

HandleReloadCommand handles the reload command.

func (*Service) Stop

func (s *Service) Stop() error

Stop disables remote access.

func (*Service) UpdateState

func (s *Service) UpdateState(ctx context.Context, edgeURL string, enabled bool) error

UpdateState ensures that remote access is enabled or disabled based on the enabled parameter.

func (*Service) WithConfigReloadNotifier

func (s *Service) WithConfigReloadNotifier(ch chan bool) *Service

WithConfigReloadNotifier registers a channel to be notified when a remote configuration reload is requested.

func (*Service) WithTLSConfig

func (s *Service) WithTLSConfig(tlsConfig *tls.Config) *Service

WithTLSConfig sets the TLS configuration for the remote access service.

Jump to

Keyboard shortcuts

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