imp

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EnvVarMasterPublicKey = "BIFROEST_MASTER_PUBLIC_KEY"
)
View Source
const (
	ServicePort = 8683
)

Variables

View Source
var (
	ErrNoSuchProcess = protocol.ErrNoSuchProcess
)

Functions

This section is empty.

Types

type Imp

type Imp interface {
	io.Closer
	Open(context.Context, Ref) (Session, error)
	GetMasterPublicKey() (crypto.PublicKey, error)
}

func NewImp

func NewImp(ctx context.Context, bifroestPrivateKey crypto.PrivateKey) (Imp, error)

type Ref

type Ref interface {
	SessionId() session.Id
	PublicKey() crypto.PublicKey
	EndpointAddr() net.HostPort
}

type Service

type Service struct {
	Version         sys.Version
	Addr            string
	MasterPublicKey crypto.PublicKey
	SessionId       session.Id

	Logger log.Logger
}

func (*Service) Serve

func (this *Service) Serve(ctx context.Context) error

type Session

type Session interface {
	io.Closer
	Ping(ctx context.Context, connectionId connection.Id) error
	InitiateTcpForward(ctx context.Context, connectionId connection.Id, target net.HostPort) (gonet.Conn, error)
	InitiateNamedPipe(ctx context.Context, connectionId connection.Id, purpose net.Purpose) (net.NamedPipe, error)

	// Kill will try to kill the process with the given signal.
	// If pid is 0, the process will be resolved by its connection.EnvVar that is matching the provided
	// connectionId.
	Kill(ctx context.Context, connectionId connection.Id, pid int, signal sys.Signal) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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