Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ProtocolRevision is the master/IMP protocol revision, independent of the application version. // Resources created before the revision metadata was introduced have revision 1. ProtocolRevision uint32 = 2 EnvVarMasterPublicKey = "BIFROEST_MASTER_PUBLIC_KEY" EnvVarReverseTCPUser = "BIFROEST_REVERSE_TCP_USER" DefaultInitPathUnix = `/var/lib/engity/bifroest/init` DefaultInitPathDarwin = `/Library/Application Support/Engity/Bifroest/init` DefaultInitPathWindows = `C:\ProgramData\Engity\Bifroest\init` )
View Source
const (
DefaultInitPath = DefaultInitPathUnix
)
View Source
const (
ServicePort = 8683
)
Variables ¶
View Source
var (
ErrNoSuchProcess = protocol.ErrNoSuchProcess
)
Functions ¶
This section is empty.
Types ¶
type ExecutionSession ¶
type ExecutionSession interface {
Session
InitiateNamedPipeForUser(ctx context.Context, connectionId connection.Id, purpose net.Purpose, user, group string) (net.NamedPipe, error)
// GetExecutionExitCode returns the exit code for one execution, or
// [connection.ErrNotFound] if its result is not available yet.
GetExecutionExitCode(ctx context.Context, connectionId connection.Id, executionId execution.Id) (int, error)
// KillExecution will try to kill the process with the given signal.
// If pid is 0, the process will be resolved from the provided execution ID.
KillExecution(ctx context.Context, connectionId connection.Id, executionId execution.Id, pid int, signal sys.Signal) error
}
type Imp ¶
type Service ¶
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)
ListenReverseTCP(ctx context.Context, connectionId connection.Id, host string, port uint16) (gonet.Listener, error)
// GetConnectionExitCode returns the legacy connection-scoped exit code, or
// [connection.ErrNotFound] if its result is not available yet.
GetConnectionExitCode(ctx context.Context, connectionId connection.Id) (int, error)
GetEnvironment(ctx context.Context, connectionId connection.Id) (sys.EnvVars, error)
// Kill will try to kill the process with the given signal.
// If pid is 0, the process will be resolved from the provided connection ID.
Kill(ctx context.Context, connectionId connection.Id, pid int, signal sys.Signal) error
}
Click to show internal directories.
Click to hide internal directories.