Documentation ¶
Index ¶
- Variables
- func APISavedStatusPtrsEqual(savedStatus *APISavedStatus, savedStatus2 *APISavedStatus) bool
- func DataSavedStatusPtrsEqual(savedStatus *DataSavedStatus, savedStatus2 *DataSavedStatus) bool
- func DeploymentStatusStrings() []string
- func ErrorBeMoreSpecific(vals ...string) error
- func ErrorInvalidType(invalid string) error
- func ErrorNameNotFound(name string) error
- func ErrorNameOrTypeNotFound(nameOrType string) error
- func ErrorNotFound(name string, resourceType Type) error
- func ErrorUnknownKind(name string) error
- type APIGroupStatus
- type APISavedStatus
- type APIStatus
- type BaseSavedStatus
- type DataExitCode
- type DataSavedStatus
- type DataStatus
- type DeploymentStatus
- type Error
- type ErrorKind
- type GroupedReplicaCounts
- type ReplicaCounts
- type Status
- type StatusCode
- func (code StatusCode) MarshalBinary() ([]byte, error)
- func (code StatusCode) MarshalText() ([]byte, error)
- func (code StatusCode) Message() string
- func (code StatusCode) SortBucket() int
- func (code StatusCode) String() string
- func (code *StatusCode) UnmarshalBinary(data []byte) error
- func (code *StatusCode) UnmarshalText(text []byte) error
- type Type
- func (t Type) MarshalBinary() ([]byte, error)
- func (t Type) MarshalText() ([]byte, error)
- func (t Type) Plural() string
- func (t Type) String() string
- func (t *Type) UnmarshalBinary(data []byte) error
- func (t *Type) UnmarshalText(text []byte) error
- func (t Type) UserFacing() string
- func (t Type) UserFacingPlural() string
- type Types
Constants ¶
This section is empty.
Variables ¶
var ( VisibleTypes = Types{ APIType, } )
Functions ¶
func APISavedStatusPtrsEqual ¶
func APISavedStatusPtrsEqual(savedStatus *APISavedStatus, savedStatus2 *APISavedStatus) bool
func DataSavedStatusPtrsEqual ¶
func DataSavedStatusPtrsEqual(savedStatus *DataSavedStatus, savedStatus2 *DataSavedStatus) bool
func DeploymentStatusStrings ¶ added in v0.7.0
func DeploymentStatusStrings() []string
func ErrorBeMoreSpecific ¶
func ErrorInvalidType ¶
func ErrorNameNotFound ¶
func ErrorNameOrTypeNotFound ¶
func ErrorNotFound ¶
func ErrorUnknownKind ¶
Types ¶
type APIGroupStatus ¶
type APIGroupStatus struct { APIName string `json:"api_name"` ActiveStatus *APIStatus `json:"active_status"` // The most recently ready API status, or the ctx API status if it's ready Code StatusCode `json:"status_code"` GroupedReplicaCounts `json:"grouped_replica_counts"` }
There is one APIGroupStatus per API name/endpoint
func (*APIGroupStatus) GetCode ¶
func (status *APIGroupStatus) GetCode() StatusCode
func (*APIGroupStatus) Message ¶
func (status *APIGroupStatus) Message() string
type APISavedStatus ¶
type APISavedStatus struct { BaseSavedStatus APIName string `json:"api_name"` }
func (*APISavedStatus) Copy ¶
func (savedStatus *APISavedStatus) Copy() *APISavedStatus
func (*APISavedStatus) Equal ¶
func (savedStatus *APISavedStatus) Equal(savedStatus2 APISavedStatus) bool
type APIStatus ¶
type APIStatus struct { APISavedStatus Path string `json:"path"` MinReplicas int32 `json:"min_replicas"` MaxReplicas int32 `json:"max_replicas"` InitReplicas int32 `json:"init_replicas"` TargetCPUUtilization int32 `json:"target_cpu_utilization"` ReplicaCounts `json:"replica_counts"` PodStatuses []k8s.PodStatus `json:"pod_statuses"` Code StatusCode `json:"status_code"` }
There is one APIStatus per API resource ID (including stale/removed models). There is always an APIStatus for APIs currently in the context.
func (*APIStatus) GetCode ¶
func (status *APIStatus) GetCode() StatusCode
type BaseSavedStatus ¶
type BaseSavedStatus struct { ResourceID string `json:"resource_id"` ResourceType Type `json:"resource_type"` WorkloadID string `json:"workload_id"` AppName string `json:"app_name"` Start *time.Time `json:"start"` End *time.Time `json:"end"` }
func (*BaseSavedStatus) Copy ¶
func (savedStatus *BaseSavedStatus) Copy() *BaseSavedStatus
func (*BaseSavedStatus) Equal ¶
func (savedStatus *BaseSavedStatus) Equal(savedStatus2 BaseSavedStatus) bool
type DataExitCode ¶
type DataExitCode string
const ( ExitCodeDataUnknown DataExitCode = "" ExitCodeDataSucceeded DataExitCode = "succeeded" ExitCodeDataFailed DataExitCode = "failed" ExitCodeDataKilled DataExitCode = "killed" ExitCodeDataOOM DataExitCode = "oom" )
type DataSavedStatus ¶
type DataSavedStatus struct { BaseSavedStatus ExitCode DataExitCode `json:"exit_code"` }
func (*DataSavedStatus) Copy ¶
func (savedStatus *DataSavedStatus) Copy() *DataSavedStatus
func (*DataSavedStatus) Equal ¶
func (savedStatus *DataSavedStatus) Equal(savedStatus2 DataSavedStatus) bool
type DataStatus ¶
type DataStatus struct { DataSavedStatus Code StatusCode `json:"status_code"` }
func (*DataStatus) GetCode ¶
func (status *DataStatus) GetCode() StatusCode
func (*DataStatus) Message ¶
func (status *DataStatus) Message() string
type DeploymentStatus ¶ added in v0.7.0
type DeploymentStatus int
const ( UnknownDeploymentStatus DeploymentStatus = iota UpdatedDeploymentStatus UpdatingDeploymentStatus ErrorDeploymentStatus )
func DeploymentStatusFromString ¶ added in v0.7.0
func DeploymentStatusFromString(s string) DeploymentStatus
func (DeploymentStatus) MarshalBinary ¶ added in v0.7.0
func (t DeploymentStatus) MarshalBinary() ([]byte, error)
MarshalBinary satisfies BinaryMarshaler
func (DeploymentStatus) MarshalText ¶ added in v0.7.0
func (t DeploymentStatus) MarshalText() ([]byte, error)
MarshalText satisfies TextMarshaler
func (DeploymentStatus) String ¶ added in v0.7.0
func (t DeploymentStatus) String() string
func (*DeploymentStatus) UnmarshalBinary ¶ added in v0.7.0
func (t *DeploymentStatus) UnmarshalBinary(data []byte) error
UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack
func (*DeploymentStatus) UnmarshalText ¶ added in v0.7.0
func (t *DeploymentStatus) UnmarshalText(text []byte) error
UnmarshalText satisfies TextUnmarshaler
type ErrorKind ¶
type ErrorKind int
func (ErrorKind) MarshalBinary ¶
MarshalBinary satisfies BinaryMarshaler
func (ErrorKind) MarshalText ¶
MarshalText satisfies TextMarshaler
func (*ErrorKind) UnmarshalBinary ¶
UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack
func (*ErrorKind) UnmarshalText ¶
UnmarshalText satisfies TextUnmarshaler
type GroupedReplicaCounts ¶ added in v0.6.0
type GroupedReplicaCounts struct { ReadyUpdated int32 `json:"ready_updated"` // Updated means the replica is fully up-to-date (compute and model match the API's current resource ID in the context) ReadyStaleModel int32 `json:"ready_stale_model"` // Stale model means the replica is serving a model which not currently in the context (either it was updated or removed) ReadyStaleCompute int32 `json:"ready_stale_compute"` // Stale compute means the replica is serving the correct model, but the compute request has changed FailedUpdated int32 `json:"failed_updated"` FailedStaleModel int32 `json:"failed_stale_model"` FailedStaleCompute int32 `json:"failed_stale_compute"` Requested int32 `json:"requested"` }
func (*GroupedReplicaCounts) Available ¶ added in v0.6.0
func (grc *GroupedReplicaCounts) Available() int32
type ReplicaCounts ¶
type ReplicaCounts struct { ReadyUpdatedCompute int32 `json:"ready_updated_compute"` ReadyStaleCompute int32 `json:"ready_stale_compute"` FailedUpdatedCompute int32 `json:"failed_updated_compute"` FailedStaleCompute int32 `json:"failed_stale_compute"` K8sRequested int32 `json:"k8s_requested"` // Number of requested replicas in an active k8s.deployment for this resource ID }
func (*ReplicaCounts) TotalFailed ¶ added in v0.6.0
func (rc *ReplicaCounts) TotalFailed() int32
func (*ReplicaCounts) TotalReady ¶
func (rc *ReplicaCounts) TotalReady() int32
type Status ¶
type Status interface { Message() string GetCode() StatusCode }
type StatusCode ¶
type StatusCode int
const ( StatusUnknown StatusCode = iota // Shared statuses StatusPending // Resource is pending other non-ready resources StatusPendingCompute StatusWaiting // Resource can be created based on resource DAG, but hasn't started yet StatusSkipped StatusError StatusParentFailed StatusParentKilled StatusKilledOOM // Data statuses StatusRunning StatusSucceeded StatusKilled // API statuses StatusLive StatusUpdating StatusStopping StatusStopped )
func (StatusCode) MarshalBinary ¶
func (code StatusCode) MarshalBinary() ([]byte, error)
MarshalBinary satisfies BinaryMarshaler
func (StatusCode) MarshalText ¶
func (code StatusCode) MarshalText() ([]byte, error)
MarshalText satisfies TextMarshaler
func (StatusCode) Message ¶
func (code StatusCode) Message() string
func (StatusCode) SortBucket ¶
func (code StatusCode) SortBucket() int
func (StatusCode) String ¶
func (code StatusCode) String() string
func (*StatusCode) UnmarshalBinary ¶
func (code *StatusCode) UnmarshalBinary(data []byte) error
UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack
func (*StatusCode) UnmarshalText ¶
func (code *StatusCode) UnmarshalText(text []byte) error
UnmarshalText satisfies TextUnmarshaler
type Type ¶
type Type int
func TypeFromKindString ¶
func TypeFromString ¶
func (Type) MarshalBinary ¶
MarshalBinary satisfies BinaryMarshaler
func (Type) MarshalText ¶
MarshalText satisfies TextMarshaler
func (*Type) UnmarshalBinary ¶
UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack
func (*Type) UnmarshalText ¶
UnmarshalText satisfies TextUnmarshaler