Versions in this module Expand all Collapse all v0 v0.0.2 Oct 23, 2024 Changes in this version + func InstanceEventSubject(m, i string) string type InstanceEvent + MachineId string v0.0.1 Oct 16, 2024 Changes in this version + func IsAlreadyExists(err error) bool + func IsFailedPrecondition(err error) bool + func IsInternal(err error) bool + func IsInvalidArgument(err error) bool + func IsNotFound(err error) bool + func IsNotImplemented(err error) bool + func IsResourcesExhausted(err error) bool + func IsUnknown(err error) bool + func NewAlreadyExists(msg string) error + func NewDeadlineExceeded(msg string) error + func NewFailedPrecondition(msg string) error + func NewInvalidArgument(msg string) error + func NewNotFound(msg string) error + func NewNotImplemented(msg string) error + func NewResourcesExhausted(msg string) error + func NewUnknown(msg string) error + func OverrideHumaErrorBuilder() + type Agent interface + CreateInstance func(ctx context.Context, options CreateInstancePayload) (*Instance, error) + DestroyInstance func(ctx context.Context, id string, force bool) error + GetInstance func(ctx context.Context, id string) (*Instance, error) + GetInstanceLogs func(ctx context.Context, id string) ([]*LogEntry, error) + InstanceExec func(ctx context.Context, id string, opt InstanceExecOptions) (*ExecResult, error) + ListInstances func(ctx context.Context) ([]Instance, error) + StartInstance func(ctx context.Context, id string) error + StopInstance func(ctx context.Context, id string, opt *StopConfig) error + SubscribeToInstanceLogs func(ctx context.Context, id string) (<-chan []*LogEntry, error) + type Allocation struct + Id string + Resources Resources + Status string + type AllocationStatus string + const AllocationStatusConfirmed + const AllocationStatusDangling + const AllocationStatusSuspended + type Code string + type CreateInstancePayload struct + Config InstanceConfig + FleetId string + MachineId string + MachineVersion string + Namespace string + Start bool + type ErrorDetail = huma.ErrorDetail + type ExecResult struct + ExitCode int + Stderr string + Stdout string + type Fleet struct + CreatedAt time.Time + Destroyed bool + Id string + Name string + Namespace string + type Gateway struct + FleetId string + Id string + Name string + Namespace string + Protocol string + TargetPort int + type GuestConfig struct + CpuKind string + Cpus int + MemoryMB int + type InitConfig struct + Cmd []string + Entrypoint []string + User string + type Instance struct + Config InstanceConfig + CreatedAt time.Time + FleetId string + Id string + LocalIPV4 string + MachineId string + MachineVersion string + Namespace string + NodeId string + ReservationId string + State InstanceState + type InstanceConfig struct + Guest InstanceGuestConfig + StopConfig StopConfig + Workload Workload + type InstanceCreatedEventPayload struct + type InstanceDestroyEventPayload struct + Force bool + Reason string + type InstanceDestroyedEventPayload struct + type InstanceEvent struct + Id ulid.ULID + InstanceId string + Origin Origin + Payload InstanceEventPayload + Reported bool + Status InstanceStatus + Timestamp time.Time + Type InstanceEventType + type InstanceEventPayload struct + Created *InstanceCreatedEventPayload + Destroy *InstanceDestroyEventPayload + Destroyed *InstanceDestroyedEventPayload + Exited *InstanceExitedEventPayload + PreparationFailed *InstancePreparationFailedEventPayload + Prepare *InstancePrepareEventPayload + Prepared *InstancePreparedEventPayload + Start *InstanceStartEventPayload + StartFailed *InstanceStartFailedEventPayload + Started *InstanceStartedEventPayload + Stop *InstanceStopEventPayload + StopFailed *InstanceStopFailedEventPayload + type InstanceEventType string + const InstanceCreated + const InstanceDestroy + const InstanceDestroyed + const InstanceExited + const InstancePreparationFailed + const InstancePrepare + const InstancePrepared + const InstanceStart + const InstanceStartFailed + const InstanceStarted + const InstanceStop + type InstanceExecOptions struct + Cmd []string + Timeout *time.Duration + func (e *InstanceExecOptions) GetTimeout() time.Duration + type InstanceExitedEventPayload struct + ExitCode *int64 + ExitedAt time.Time + Requested bool + Success bool + type InstanceGuestConfig struct + Cpus int + MemoryMB int + VCpus int + type InstancePreparationFailedEventPayload struct + Error string + type InstancePrepareEventPayload struct + Retries int + type InstancePreparedEventPayload struct + type InstanceStartEventPayload struct + IsRestart bool + type InstanceStartFailedEventPayload struct + Error string + type InstanceStartedEventPayload struct + type InstanceState struct + DesiredStatus InstanceStatus + Restarts int + Status InstanceStatus + type InstanceStatus = MachineStatus + type InstanceStopEventPayload struct + Signal string + type InstanceStopFailedEventPayload struct + Error string + type LogEntry struct + InstanceId string + Level string + Message string + Source string + Timestamp int64 + type Machine struct + CreatedAt time.Time + Destroyed bool + FleetId string + Id string + InstanceId string + MachineVersion ulid.ULID + Namespace string + Node string + Region string + UpdatedAt time.Time + type MachineConfig struct + AutoDestroy bool + Guest GuestConfig + StopConfig StopConfig + Workload Workload + type MachineStatus string + const MachineStatusCreated + const MachineStatusDestroyed + const MachineStatusDestroying + const MachineStatusPreparing + const MachineStatusRunning + const MachineStatusStarting + const MachineStatusStopped + const MachineStatusStopping + type MachineVersion struct + Config MachineConfig + Id ulid.ULID + MachineId string + type Namespace struct + CreatedAt time.Time + Name string + type Node struct + Address string + HeartbeatedAt time.Time + Id string + Region string + type Origin string + const OriginRavel + const OriginUser + type RavelError struct + Detail string + Errors []*ErrorDetail + RavelCode Code + Status int + Title string + func FromHTTPResponse(resp *http.Response) *RavelError + func (r *RavelError) Code() Code + func (r *RavelError) Error() string + func (r *RavelError) GetStatus() int + type RegistryAuthConfig struct + Auth string + IdentityToken string + Password string + ServerAddress string + Username string + type Resources struct + Cpus int + Memory int + func (r *Resources) Add(other Resources) Resources + func (r *Resources) GT(other Resources) bool + func (r *Resources) Sub(other Resources) Resources + type RestartPolicy string + const RestartPolicyAlways + const RestartPolicyNever + const RestartPolicyOnFailure + type RestartPolicyConfig struct + MaxRetries int + Policy RestartPolicy + type Service struct + FleetId string + HostAddress string + HostPort int + Id string + InstanceId string + LocalIPV4Address string + LocalPort int + Name string + type StopConfig struct + Signal *string + Timeout *int + func (s *StopConfig) GetSignal() string + func (s *StopConfig) GetTimeout() time.Duration + type Workload struct + Env []string + Image string + Init InitConfig + RestartPolicy RestartPolicyConfig