Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
)
Functions ¶
This section is empty.
Types ¶
type CommandRunner ¶
func NewCommandRunner ¶
type Dependencies ¶
type Dependencies struct {
Stdin *os.File
Stdout, Stderr io.Writer
LookupEnv config.LookupEnv
UserHomeDir config.UserHomeDir
IsTerminal func(int) bool
ReadPassword func(int) ([]byte, error)
ReadConfirmation func(*os.File) (string, error)
InitializeSecrets func(config.Config) error
RunApplication func(context.Context, config.Config) error
NewClient func(string) (ImportClient, error)
NewAdminClient func(string) (MCPTokenClient, error)
Version string
InvocationPath string
ProtectedFileValidator ProtectedFileValidator
NewServiceManager func(config.Config) (ServiceManager, error)
HealthChecker HealthChecker
RunMCPAdapter RunMCPAdapter
}
type EnvironmentVariable ¶
type EnvironmentVariable struct{ Name, Value string }
type HealthChecker ¶
type HealthChecker interface {
Check(context.Context, string) error
Wait(context.Context, string) error
}
func NewHealthChecker ¶
func NewHealthChecker() HealthChecker
type ImportClient ¶
type ImportClient interface {
Import(context.Context, connection.ImportRequest) (connection.ImportResult, error)
}
func NewUnixClient ¶
func NewUnixClient(socketPath string) (ImportClient, error)
type MCPTokenClient ¶
type MCPTokenClient interface {
CreateMCPToken(context.Context) (string, mcptoken.Metadata, error)
MCPTokenStatus(context.Context) (mcptoken.Status, error)
RotateMCPToken(context.Context) (string, mcptoken.Metadata, error)
RevokeMCPToken(context.Context) error
}
func NewMCPTokenClient ¶
func NewMCPTokenClient(socketPath string) (MCPTokenClient, error)
type NativeState ¶
type NativeState string
const ( NativeRunning NativeState = "running" NativeStopped NativeState = "stopped" NativeFailed NativeState = "failed" )
type NativeStatus ¶
type NativeStatus struct {
Registered bool
State NativeState
PID int
}
type ProtectedFileValidator ¶
type RunMCPAdapter ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func New ¶
func New(dependencies Dependencies) (*Runner, error)
type ServiceDefinition ¶
type ServiceDefinition struct {
Executable string
Arguments []string
Environment []EnvironmentVariable
StdoutPath, StderrPath string
}
type ServiceManager ¶
type ServiceManager interface {
Register(context.Context, ServiceDefinition) error
Start(context.Context) error
Restart(context.Context) error
Stop(context.Context) error
Unregister(context.Context) error
Status(context.Context) (NativeStatus, error)
DefinitionPath() string
LogLocation() string
}
func NewNativeServiceManager ¶
func NewNativeServiceManager(goos, home string, uid int, runner CommandRunner) (ServiceManager, error)
Click to show internal directories.
Click to hide internal directories.