Documentation
¶
Index ¶
- Constants
- Variables
- func FilterGPUInterface(val string) string
- type Deployment
- type EventsWatcher
- type ExecResult
- type HostnameServiceClient
- type IDeployment
- type Inventory
- type InventoryOption
- type InventoryOptions
- type LeaseEvent
- type LeaseEventObject
- type MGroup
- type ProviderResourceEvent
- type Reservation
- type ReservationGroup
- type ServiceLog
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 ¶
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{}
ResourceVer string
}
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
func (*Deployment) ResourceVersion ¶ added in v0.6.5
func (d *Deployment) ResourceVersion() string
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 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{}
ResourceVersion() string
}
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 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
Click to show internal directories.
Click to hide internal directories.