v1beta3

package
v0.6.4-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderResourceAdd    = ProviderResourceEvent("add")
	ProviderResourceUpdate = ProviderResourceEvent("update")
	ProviderResourceDelete = ProviderResourceEvent("delete")
)

Variables

View Source
var (
	// ErrInsufficientCapacity is the new error when capacity is insufficient
	ErrInsufficientCapacity  = errors.New("insufficient capacity")
	ErrGroupResourceMismatch = errors.New("group resource mismatch")
)

Functions

func FilterGPUInterface

func FilterGPUInterface(val string) string

FilterGPUInterface ensures interface values are always lower case generalizes sxm* to sxm

Types

type Deployment

type Deployment struct {
	Lid     mtypes.LeaseID
	MGroup  *maniv2beta2.Group
	CParams interface{}
}

func (*Deployment) ClusterParams

func (d *Deployment) ClusterParams() interface{}

func (*Deployment) LeaseID

func (d *Deployment) LeaseID() mtypes.LeaseID

func (*Deployment) ManifestGroup

func (d *Deployment) ManifestGroup() *maniv2beta2.Group

type EventsWatcher

type EventsWatcher interface {
	Shutdown()
	Done() <-chan struct{}
	ResultChan() <-chan *eventsv1.Event
	SendEvent(*eventsv1.Event) bool
}

func NewEventsFeed

func NewEventsFeed(ctx context.Context) EventsWatcher

type ExecResult

type ExecResult interface {
	ExitCode() int
}

type ForwardedPortStatus

type ForwardedPortStatus struct {
	Host         string                   `json:"host,omitempty"`
	Port         uint16                   `json:"port"`
	ExternalPort uint16                   `json:"externalPort"`
	Proto        manifest.ServiceProtocol `json:"proto"`
	Name         string                   `json:"name"`
}

type HostnameServiceClient

type HostnameServiceClient interface {
	ReserveHostnames(ctx context.Context, hostnames []string, leaseID mtypes.LeaseID) ([]string, error)
	ReleaseHostnames(leaseID mtypes.LeaseID) error
	CanReserveHostnames(hostnames []string, ownerAddr sdktypes.Address) error
	PrepareHostnamesForTransfer(ctx context.Context, hostnames []string, leaseID mtypes.LeaseID) error
}

type IDeployment

type IDeployment interface {
	LeaseID() mtypes.LeaseID
	ManifestGroup() *maniv2beta2.Group
	ClusterParams() interface{}
}

IDeployment interface defined with LeaseID and ManifestGroup methods

type Inventory

type Inventory interface {
	Adjust(ReservationGroup, ...InventoryOption) error
	Metrics() inventoryV1.Metrics
	Snapshot() inventoryV1.Cluster
	Dup() Inventory
}

type InventoryOption

type InventoryOption func(*InventoryOptions) *InventoryOptions

func WithDryRun

func WithDryRun() InventoryOption

type InventoryOptions

type InventoryOptions struct {
	DryRun bool
}

type LeaseEvent

type LeaseEvent struct {
	Type                string           `json:"type" yaml:"type"`
	ReportingController string           `json:"reportingController,omitempty" yaml:"reportingController"`
	ReportingInstance   string           `json:"reportingInstance,omitempty" yaml:"reportingInstance"`
	Reason              string           `json:"reason" yaml:"reason"`
	Note                string           `json:"note" yaml:"note"`
	Object              LeaseEventObject `json:"object" yaml:"object"`
}

type LeaseEventObject

type LeaseEventObject struct {
	Kind      string `json:"kind" yaml:"kind"`
	Namespace string `json:"namespace" yaml:"namespace"`
	Name      string `json:"name" yaml:"name"`
}

type LeaseStatus

type LeaseStatus struct {
	Services       map[string]*ServiceStatus        `json:"services"`
	ForwardedPorts map[string][]ForwardedPortStatus `json:"forwarded_ports"` // Container services that are externally accessible
}

LeaseStatus includes list of services with their status

type MGroup

type MGroup interface {
	ManifestGroup() mani.Group
}

type ProviderResourceEvent

type ProviderResourceEvent string

type Reservation

type Reservation interface {
	OrderID() mtypes.OrderID
	Allocated() bool
	ReservationGroup
}

Reservation interface implements orders and resources

type ReservationGroup

type ReservationGroup interface {
	Resources() dtypes.ResourceGroup
	SetAllocatedResources(dtypes.ResourceUnits)
	GetAllocatedResources() dtypes.ResourceUnits
	SetClusterParams(interface{})
	ClusterParams() interface{}
}

type ServiceLog

type ServiceLog struct {
	Name    string
	Stream  io.ReadCloser
	Scanner *bufio.Scanner
}

ServiceLog stores name, stream and scanner

type ServiceStatus

type ServiceStatus struct {
	Name      string   `json:"name"`
	Available int32    `json:"available"`
	Total     int32    `json:"total"`
	URIs      []string `json:"uris"`

	ObservedGeneration int64 `json:"observed_generation"`
	Replicas           int32 `json:"replicas"`
	UpdatedReplicas    int32 `json:"updated_replicas"`
	ReadyReplicas      int32 `json:"ready_replicas"`
	AvailableReplicas  int32 `json:"available_replicas"`
}

ServiceStatus stores the current status of service

type Status

type Status struct {
	Leases    uint32                       `json:"leases"`
	Inventory inventoryV1.InventoryMetrics `json:"inventory"`
}

Status stores current leases and inventory statuses

Directories

Path Synopsis
clients
ip

Jump to

Keyboard shortcuts

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