Documentation ¶
Index ¶
- Constants
- func Decode(in []byte, out interface{}) error
- func DecodeGOB(in []byte, out interface{}) error
- func DecodeJSON(in []byte, out interface{}) error
- func Encode(in interface{}) ([]byte, error)
- func EncodeGOB(in interface{}) ([]byte, error)
- func EncodeJSON(in interface{}) ([]byte, error)
- func RegisterGOBTypes()
- type ContainerResourceRequirements
- type ContainerResources
- type DecisionExecutionStatus
- type MetricStoreRequest
- type PacketApplicationsStoreRequest
- type PacketApplicationsStoreResponse
- type PacketAuthorizationAnswer
- type PacketAuthorizationFailure
- type PacketAuthorizationQuestion
- type PacketAuthorizationRequest
- type PacketAuthorizationSuccess
- type PacketBye
- type PacketDecision
- type PacketDecisionFeedbackRequest
- type PacketDecisionFeedbackResponse
- type PacketDecisionPullRequest
- type PacketDecisionPullResponse
- type PacketDecisionResponse
- type PacketEventLastValueRequest
- type PacketEventLastValueResponse
- type PacketEventsStoreRequest
- type PacketEventsStoreResponse
- type PacketHello
- type PacketKind
- type PacketLogItem
- type PacketLogs
- type PacketMetricFamilyItem
- type PacketMetricValueItem
- type PacketMetricsPromStoreRequest
- type PacketMetricsPromStoreResponse
- type PacketMetricsStoreRequest
- type PacketMetricsStoreResponse
- type PacketNodesStoreRequest
- type PacketNodesStoreResponse
- type PacketPing
- type PacketPong
- type PacketRaw
- type PacketRawRequest
- type PacketRawResponse
- type PacketRegisterApplicationItem
- type PacketRegisterContainerItem
- type PacketRegisterEntityItem
- type PacketRegisterNodeCapacityItem
- type PacketRegisterNodeContainerListItem
- type PacketRegisterNodeContainerListResourcesItem
- type PacketRegisterNodeItem
- type PacketRegisterServiceItem
- type PacketRestart
- type PacketStatusStoreRequest
- type PacketStatusStoreResponse
- type ReplicasStatus
- type RequestLimit
- type ResourcesRequirementsKind
Constants ¶
View Source
const ( ResourceRequirementKindSet = "set" ResourceRequirementKindDefaultsLimitRange = "defaults-limit-range" ResourceRequirementKindDefaultFromLimits = "default-from-limits" )
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
func EncodeJSON ¶
func RegisterGOBTypes ¶
func RegisterGOBTypes()
Types ¶
type ContainerResourceRequirements ¶
type ContainerResourceRequirements struct { kv1.ResourceRequirements SpecResourceRequirements kv1.ResourceRequirements `json:"spec_resources_requirements,omitempty"` LimitsKinds ResourcesRequirementsKind `json:"limits_kinds,omitempty"` RequestsKinds ResourcesRequirementsKind `json:"requests_kinds,omitempty"` }
type ContainerResources ¶
type ContainerResources struct { Requests RequestLimit `json:"requests,omitempty"` Limits RequestLimit `json:"limits,omitempty"` }
type DecisionExecutionStatus ¶
type DecisionExecutionStatus string
const ( DecisionExecutionStatusSucceed DecisionExecutionStatus = "executed" DecisionExecutionStatusFailed DecisionExecutionStatus = "failed" DecisionExecutionStatusSkipped DecisionExecutionStatus = "skipped" )
type MetricStoreRequest ¶
type MetricStoreRequest struct { Name string `json:"name"` Type string `json:"type"` Node uuid.UUID `json:"node"` Application uuid.UUID `json:"application"` Service uuid.UUID `json:"service"` Container uuid.UUID `json:"container"` Timestamp time.Time `json:"timestamp"` Value int64 `json:"value"` Pod string `json:"pod"` AdditionalTags map[string]interface{} `json:"additional_tags"` }
type PacketApplicationsStoreRequest ¶
type PacketApplicationsStoreRequest []PacketRegisterApplicationItem
type PacketApplicationsStoreResponse ¶
type PacketApplicationsStoreResponse struct{}
type PacketAuthorizationAnswer ¶
type PacketAuthorizationAnswer struct {
Token []byte `json:"token"`
}
type PacketAuthorizationFailure ¶
type PacketAuthorizationFailure struct{}
type PacketAuthorizationQuestion ¶
type PacketAuthorizationQuestion struct {
Token []byte `json:"token"`
}
type PacketAuthorizationRequest ¶
type PacketAuthorizationRequest struct { AccountID uuid.UUID `json:"account_id"` ClusterID uuid.UUID `json:"cluster_id"` }
type PacketAuthorizationSuccess ¶
type PacketAuthorizationSuccess struct{}
type PacketDecision ¶
type PacketDecision struct { ID uuid.UUID `json:"id"` ServiceId uuid.UUID `json:"service_id"` ContainerId uuid.UUID `json:"container_id"` ContainerResources ContainerResources `json:"container_resources"` }
type PacketDecisionFeedbackRequest ¶
type PacketDecisionFeedbackRequest struct { ID uuid.UUID `json:"id"` ServiceId uuid.UUID `json:"service_id"` ContainerId uuid.UUID `json:"container_id"` Status DecisionExecutionStatus `json:"status"` Message string `json:"message"` }
type PacketDecisionFeedbackResponse ¶
type PacketDecisionFeedbackResponse struct{}
type PacketDecisionPullRequest ¶
type PacketDecisionPullRequest struct{}
type PacketDecisionPullResponse ¶
type PacketDecisionPullResponse struct {
Decisions []*PacketDecision `json:"decisions"`
}
type PacketDecisionResponse ¶
type PacketDecisionResponse struct {
Error *string `json:"error"`
}
type PacketEventLastValueResponse ¶
type PacketEventLastValueResponse struct {
Value interface{} `json:"value"`
}
type PacketEventsStoreResponse ¶
type PacketEventsStoreResponse struct{}
type PacketHello ¶
type PacketKind ¶
type PacketKind string
const ( PacketKindHello PacketKind = "hello" PacketKindAuthorizationRequest PacketKind = "authorization/request" PacketKindAuthorizationQuestion PacketKind = "authorization/question" PacketKindAuthorizationAnswer PacketKind = "authorization/answer" PacketKindAuthorizationFailure PacketKind = "authorization/failure" PacketKindAuthorizationSuccess PacketKind = "authorization/success" PacketKindLogs PacketKind = "logs" PacketKindMetricsStoreRequest PacketKind = "metrics/store" PacketKindMetricsPromStoreRequest PacketKind = "metrics/prom/store" PacketKindApplicationsStoreRequest PacketKind = "applications/store" PacketKindNodesStoreRequest PacketKind = "nodes/store" PacketKindEventLastValueRequest PacketKind = "events/query/last_value" PacketKindEventsStoreRequest PacketKind = "events/store" PacketKindStatusStoreRequest PacketKind = "status/store" PacketKindBye PacketKind = "bye" PacketKindDecision PacketKind = "decision" PacketKindDecisionFeedback PacketKind = "decision/feedback" PacketKindDecisionPull PacketKind = "decision/pull" PacketKindRestart PacketKind = "restart" PacketKindRawStoreRequest PacketKind = "raw/store" )
const ( PacketKindPing PacketKind = "ping" PacketKindPong PacketKind = "pong" )
func (PacketKind) String ¶
func (kind PacketKind) String() string
type PacketLogItem ¶
type PacketLogs ¶
type PacketLogs []PacketLogItem
type PacketMetricFamilyItem ¶
type PacketMetricFamilyItem struct { Name string Help string Type string Tags []string Values []*PacketMetricValueItem }
type PacketMetricValueItem ¶
type PacketMetricsPromStoreRequest ¶
type PacketMetricsPromStoreRequest struct { Timestamp time.Time Metrics []*PacketMetricFamilyItem }
type PacketMetricsPromStoreResponse ¶
type PacketMetricsPromStoreResponse struct { }
type PacketMetricsStoreRequest ¶
type PacketMetricsStoreRequest []MetricStoreRequest
type PacketMetricsStoreResponse ¶
type PacketMetricsStoreResponse struct { }
type PacketNodesStoreRequest ¶
type PacketNodesStoreRequest []PacketRegisterNodeItem
type PacketNodesStoreResponse ¶
type PacketNodesStoreResponse struct{}
type PacketPing ¶
type PacketPong ¶
type PacketRawRequest ¶
type PacketRawResponse ¶
type PacketRawResponse struct{}
type PacketRegisterApplicationItem ¶
type PacketRegisterApplicationItem struct { PacketRegisterEntityItem LimitRanges []kv1.LimitRange `json:"limit_ranges"` Services []PacketRegisterServiceItem `json:"services"` }
type PacketRegisterContainerItem ¶
type PacketRegisterContainerItem struct { PacketRegisterEntityItem Image string `json:"image"` Resources json.RawMessage `json:"resources"` LivenessProbe json.RawMessage `json:"liveness_probe"` ReadinessProbe json.RawMessage `json:"readiness_probe"` }
type PacketRegisterNodeContainerListItem ¶
type PacketRegisterNodeContainerListItem struct { // cluster where host of container located in Cluster string `json:"cluster"` // image of container Image string `json:"image"` // limits of container Limits *PacketRegisterNodeContainerListResourcesItem `json:"limits"` // requests of container Requests *PacketRegisterNodeContainerListResourcesItem `json:"requests"` // name of container (not guaranteed to be unique in cluster scope) Name string `json:"name"` // namespace where pod located in Namespace string `json:"namespace"` // node where container located in Node string `json:"node"` // pod where container located in Pod string `json:"pod"` }
type PacketRegisterNodeContainerListResourcesItem ¶
type PacketRegisterNodeContainerListResourcesItem struct { CPU int `json:"cpu"` Memory int `json:"memory"` }
PacketRegisterNodeContainerListResourcesItem
type PacketRegisterNodeItem ¶
type PacketRegisterNodeItem struct { ID uuid.UUID `json:"id,omitempty"` Name string `json:"name"` IP string `json:"ip"` Roles string `json:"roles"` Region string `json:"region,omitempty"` Provider string `json:"provider,omitempty"` InstanceType string `json:"instance_type,omitempty"` InstanceSize string `json:"instance_size,omitempty"` Capacity PacketRegisterNodeCapacityItem `json:"capacity"` Allocatable PacketRegisterNodeCapacityItem `json:"allocatable"` Containers int `json:"containers,omitempty"` ContainerList []*PacketRegisterNodeContainerListItem `json:"container_list,omitempty"` }
type PacketRegisterServiceItem ¶
type PacketRegisterServiceItem struct { PacketRegisterEntityItem ReplicasStatus ReplicasStatus `json:"replicas_status,omitempty"` Containers []PacketRegisterContainerItem `json:"containers"` }
type PacketRestart ¶
type PacketRestart struct {
Status int `json:"status"`
}
type PacketStatusStoreResponse ¶
type PacketStatusStoreResponse struct{}
type ReplicasStatus ¶
type RequestLimit ¶
type ResourcesRequirementsKind ¶
type ResourcesRequirementsKind = map[kv1.ResourceName]string
Click to show internal directories.
Click to hide internal directories.