Documentation
¶
Index ¶
- Constants
- Variables
- type ActiveHostname
- type ClusterIPPassthroughDirective
- type ConnectHostnameToDeploymentDirective
- type Deployment
- type EventsWatcher
- type ExecResult
- type ForwardedPortStatus
- type Group
- type HostnameResourceEvent
- type HostnameServiceClient
- type IPLeaseState
- type IPPassthrough
- type IPResourceEvent
- type Inventory
- type InventoryMetricTotal
- type InventoryMetrics
- type InventoryNode
- type InventoryNodeMetric
- type InventoryStatus
- type InventoryStorageStatus
- type LeaseEvent
- type LeaseEventObject
- type LeaseIDHostnameConnection
- type LeaseStatus
- type ProviderResourceEvent
- type Reservation
- type Service
- type ServiceLog
- type ServiceStatus
- type Status
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") )
Functions ¶
This section is empty.
Types ¶
type ActiveHostname ¶
type Deployment ¶
Deployment interface defined with LeaseID and ManifestGroup methods
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 HostnameResourceEvent ¶
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 IPLeaseState ¶
type IPLeaseState interface {
IPPassthrough
GetIP() string
}
type IPPassthrough ¶
type IPResourceEvent ¶
type IPResourceEvent interface {
GetLeaseID() mtypes.LeaseID
GetServiceName() string
GetExternalPort() uint32
GetPort() uint32
GetSharingKey() string
GetProtocol() manifest.ServiceProtocol
GetEventType() ProviderResourceEvent
}
type Inventory ¶
type Inventory interface {
Adjust(Reservation) error
Metrics() InventoryMetrics
}
type InventoryMetricTotal ¶
type InventoryMetricTotal struct {
CPU uint64 `json:"cpu"`
Memory uint64 `json:"memory"`
StorageEphemeral uint64 `json:"storage_ephemeral"`
Storage map[string]int64 `json:"storage,omitempty"`
}
func (*InventoryMetricTotal) AddResources ¶
func (inv *InventoryMetricTotal) AddResources(res types.Resources)
type InventoryMetrics ¶
type InventoryMetrics struct {
Nodes []InventoryNode `json:"nodes"`
TotalAllocatable InventoryMetricTotal `json:"total_allocatable"`
TotalAvailable InventoryMetricTotal `json:"total_available"`
}
type InventoryNode ¶
type InventoryNode struct {
Name string `json:"name"`
Allocatable InventoryNodeMetric `json:"allocatable"`
Available InventoryNodeMetric `json:"available"`
}
type InventoryNodeMetric ¶
type InventoryStatus ¶
type InventoryStatus struct {
Active []InventoryMetricTotal `json:"active,omitempty"`
Pending []InventoryMetricTotal `json:"pending,omitempty"`
Available struct {
Nodes []InventoryNodeMetric `json:"nodes,omitempty"`
Storage []InventoryStorageStatus `json:"storage,omitempty"`
} `json:"available,omitempty"`
Error error `json:"error,omitempty"`
}
InventoryStatus stores active, pending and available units
type InventoryStorageStatus ¶
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 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 ProviderResourceEvent ¶
type ProviderResourceEvent string
type Reservation ¶
type Reservation interface {
OrderID() mtypes.OrderID
Resources() atypes.ResourceGroup
Allocated() bool
}
Reservation interface implements orders and resources
type Service ¶
type Service struct {
maniv2beta1.Service `json:",inline"`
}
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 InventoryStatus `json:"inventory"`
}
Status stores current leases and inventory statuses
Click to show internal directories.
Click to hide internal directories.