Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyUUID = errors.New("empty UUID found for enclave") ErrUUIDNotFound = errors.New("UUID not found in enclave inspect output") ErrContainerNotFound = errors.New("container not found for service") ErrServiceNotFound = errors.New("service not found in enclave") ErrEndpointNotFound = errors.New("endpoint not found for service") )
Static errors for better error handling
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
InspectService(ctx context.Context, enclaveName, service string) (*KurtosisServiceInspectResult, error)
DoesEnclaveExist(ctx context.Context, enclaveName string) (bool, error)
GetServiceStatus(ctx context.Context, enclaveName, serviceName string) (*ServiceStatus, error)
// Enhanced service discovery methods
GetServiceEndpoints(ctx context.Context, enclaveName string) (map[string]*ServiceEndpointInfo, error)
GetELClientEndpoint(ctx context.Context, enclaveName string) (*ServiceEndpointInfo, error)
GetCLClientEndpoint(ctx context.Context, enclaveName string) (*ServiceEndpointInfo, error)
GetClientDataVolumes(ctx context.Context, enclaveName string) (map[string][]VolumeMount, error)
}
Client defines the interface for execution layer operations
func NewClient ¶
func NewClient(log logrus.FieldLogger) Client
NewClient creates a new kurtosis client
type ClientEndpointConfig ¶ added in v0.2.0
type ClientEndpointConfig struct {
ServiceNames []string
PortKeyword string
DefaultPort int
ClientType string
}
ClientEndpointConfig holds configuration for finding client endpoints
type KurtosisPortInfo ¶
type KurtosisPortInfo struct {
Number int `json:"number"`
Transport TransportProtocol `json:"transport"`
MaybeApplicationProtocol *string `json:"maybe_application_protocol,omitempty"`
}
KurtosisPortInfo represents port information from Kurtosis service inspect
type KurtosisServiceInspectResult ¶
type KurtosisServiceInspectResult struct {
Image string `json:"image"`
Ports map[string]KurtosisPortInfo `json:"ports"`
PublicPorts map[string]KurtosisPortInfo `json:"public_ports"`
Files map[string][]string `json:"files"`
Entrypoint []string `json:"entrypoint"`
Cmd []string `json:"cmd"`
EnvVars map[string]string `json:"env_vars"`
Labels map[string]string `json:"labels"`
TiniEnabled bool `json:"tini_enabled"`
TtyEnabled bool `json:"tty_enabled"`
}
KurtosisServiceInspectResult represents the result of kurtosis service inspect command
type ServiceEndpointInfo ¶ added in v0.2.0
type ServiceEndpointInfo struct {
ServiceName string
InternalIP string
InternalPort int32
PublicIP string
PublicPort uint16
Protocol string
ContainerID string
NetworkName string
}
ServiceEndpointInfo contains detailed information about a service endpoint
type ServiceStatus ¶
type ServiceStatus struct {
IsRunning bool `json:"is_running"`
State string `json:"state"`
ExitCode int `json:"exit_code"`
Error string `json:"error,omitempty"`
}
ServiceStatus represents the status of a container service
type TransportProtocol ¶
type TransportProtocol int
TransportProtocol represents the transport protocol type
const ( TCP TransportProtocol = 0 UDP TransportProtocol = 2 )
type VolumeMount ¶ added in v0.2.0
type VolumeMount struct {
Type string // bind, volume, tmpfs
Name string // volume name (for named volumes)
Source string // host path (for bind mounts) or volume name
Destination string // container path
Driver string // volume driver
Mode string // rw, ro, z, Z
RW bool // read-write flag
Propagation string // mount propagation
}
VolumeMount represents a Docker volume mount for service discovery
Click to show internal directories.
Click to hide internal directories.