proto

package
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceRequirementKindSet                = "set"
	ResourceRequirementKindDefaultsLimitRange = "defaults-limit-range"
	ResourceRequirementKindDefaultFromLimits  = "default-from-limits"
)

Variables

This section is empty.

Functions

func Decode deprecated

func Decode(in []byte, out interface{}) error

Deprecated: Falls back to DecodeGOB. Kept only for backward compatibility. Should be removed.

func DecodeGOB

func DecodeGOB(in []byte, out interface{}) error

func DecodeJSON

func DecodeJSON(in []byte, out interface{}) error

func DecodeSnappy

func DecodeSnappy(in []byte, out interface{}) error

func Encode deprecated

func Encode(in interface{}) (out []byte, err error)

Deprecated: Fall back to EncodeGOB. Kept only for backward compatibility. Should be removed.

func EncodeGOB

func EncodeGOB(in interface{}) ([]byte, error)

func EncodeJSON

func EncodeJSON(in interface{}) ([]byte, error)

func EncodeSnappy

func EncodeSnappy(in interface{}) (out []byte, err error)

func RegisterGOBTypes

func RegisterGOBTypes()

Types

type AutomationStatus added in v2.9.0

type AutomationStatus string
const (
	AutomationExecuted AutomationStatus = "executed"
	AutomationFailed   AutomationStatus = "failed"
	AutomationSkipped  AutomationStatus = "skipped"
)

type ContainerResources

type ContainerResources struct {
	Requests *RequestLimit `json:"requests,omitempty"`
	Limits   *RequestLimit `json:"limits,omitempty"`
}

type EntityDeltaKind

type EntityDeltaKind string
const (
	EntityEventTypeUpsert EntityDeltaKind = "UPSERT"
	EntityEventTypeDelete EntityDeltaKind = "DELETE"
)

type GroupVersionResourceKind

type GroupVersionResourceKind struct {
	schema.GroupVersionResource
	Kind string `json:"kind"`
}

type MetricStoreV2Request

type MetricStoreV2Request struct {
	Name           string    `json:"name"`
	Type           string    `json:"type"`
	NodeName       string    `json:"node_name"`
	NodeIP         string    `json:"node_ip"`
	NamespaceName  string    `json:"namespace_name"`
	ControllerName string    `json:"controller_name"`
	ControllerKind string    `json:"controller_kind"`
	ContainerName  string    `json:"container_name"`
	Timestamp      time.Time `json:"timestamp"`
	Value          int64     `json:"value"`
	PodName        string    `json:"pod_name"`

	AdditionalTags map[string]interface{} `json:"additional_tags"`
}

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 PacketAutomation added in v2.9.0

type PacketAutomation struct {
	ID string `json:"id"`

	NamespaceName  string `json:"namespace_name"`
	ControllerName string `json:"controller_name"`
	ControllerKind string `json:"controller_kind"`
	ContainerName  string `json:"container_name"`

	ContainerResources ContainerResources `json:"container_resources"`
}

type PacketAutomationFeedbackRequest added in v2.9.0

type PacketAutomationFeedbackRequest struct {
	ID string `json:"id"`

	NamespaceName  string `json:"namespace_name"`
	ControllerName string `json:"controller_name"`
	ControllerKind string `json:"controller_kind"`
	ContainerName  string `json:"container_name"`

	Status  AutomationStatus `json:"status"`
	Message string           `json:"message"`
}

type PacketAutomationResponse added in v2.9.0

type PacketAutomationResponse struct {
	ID    string  `json:"id"`
	Error *string `json:"error"`
}

type PacketBye

type PacketBye struct {
	Reason string `json:"reason,omitempty"`
}

type PacketEntitiesDeltasRequest

type PacketEntitiesDeltasRequest struct {
	Items     []PacketEntityDelta `json:"items"`
	Timestamp time.Time           `json:"timestamp"`
}

type PacketEntitiesDeltasResponse

type PacketEntitiesDeltasResponse struct{}

type PacketEntitiesResyncItem

type PacketEntitiesResyncItem struct {
	Gvrk GroupVersionResourceKind     `json:"gvrk"`
	Data []*unstructured.Unstructured `json:"data"`
}

type PacketEntitiesResyncRequest

type PacketEntitiesResyncRequest struct {
	Timestamp time.Time `json:"timestamp"`

	// map of entities kind and entities definitions
	// it holds other entities not already specified in attributes above
	Snapshot map[string]PacketEntitiesResyncItem `json:"snapshot"`
}

type PacketEntitiesResyncResponse

type PacketEntitiesResyncResponse struct{}

type PacketEntityDelta

type PacketEntityDelta struct {
	Gvrk      GroupVersionResourceKind  `json:"gvrk"`
	DeltaKind EntityDeltaKind           `json:"delta_kind"`
	Data      unstructured.Unstructured `json:"data"`
	Parent    *ParentController         `json:"parents"`
	Timestamp time.Time                 `json:"timestamp"`
}

type PacketHello

type PacketHello struct {
	Major            uint      `json:"major"`
	Minor            uint      `json:"minor"`
	Build            string    `json:"build"`
	StartID          string    `json:"start_id"`
	AccountID        uuid.UUID `json:"account_id"`
	ClusterID        uuid.UUID `json:"cluster_id"`
	PacketV2Enabled  bool      `json:"packet_v2_enabled,omitempty"`
	ServerVersion    string    `json:"server_version"`
	AgentPermissions string    `json:"agent_permissions"`
}

type PacketKind

type PacketKind string
const (
	PacketKindHello PacketKind = "hello"

	PacketKindAuthorizationRequest PacketKind = "authorization/request"
	PacketKindAuthorizationAnswer  PacketKind = "authorization/answer"

	PacketKindLogs PacketKind = "logs"

	PacketKindMetricsStoreV2Request PacketKind = "metrics/store_v2"

	PacketKindEntitiesDeltasRequest PacketKind = "entities/deltas"
	PacketKindEntitiesResyncRequest PacketKind = "entities/resync"

	PacketKindBye PacketKind = "bye"

	PacketKindAutomation         PacketKind = "automation"
	PacketKindAutomationFeedback PacketKind = "automation/feedback"

	PacketKindRestart PacketKind = "restart"

	PacketKindRawStoreRequest PacketKind = "raw/store"

	PacketKindLogLevel PacketKind = "loglevel"
)
const (
	PacketKindPing PacketKind = "ping"
)

func (PacketKind) String

func (kind PacketKind) String() string

type PacketLogItem

type PacketLogItem struct {
	Date time.Time `json:"date"`
	Data string    `json:"data"`
}

type PacketLogLevel added in v2.9.0

type PacketLogLevel struct {
	Level string `json:"level"`
}

PacketLogLevel used to change current log level

type PacketLogs

type PacketLogs []PacketLogItem

type PacketMetricsStoreV2Request

type PacketMetricsStoreV2Request []MetricStoreV2Request

type PacketPing

type PacketPing struct {
	Number  int       `json:"number,omitempty"`
	Started time.Time `json:"started"`
}

type PacketPong

type PacketPong struct {
	Number  int       `json:"number,omitempty"`
	Started time.Time `json:"started"`
}

type PacketRestart

type PacketRestart struct {
	Status int `json:"status"`
}

type ParentController

type ParentController struct {
	Kind       string `json:"kind"`
	Name       string `json:"name"`
	APIVersion string `json:"api_version"`
	IsWatched  bool   `json:"is_watched"`

	Parent *ParentController `json:"parent"`
}

type ReplicasStatus

type ReplicasStatus struct {
	Desired   *int32 `json:"desired,omitempty"`
	Current   *int32 `json:"current,omitempty"`
	Ready     *int32 `json:"ready,omitempty"`
	Available *int32 `json:"available,omitempty"`
}

type RequestLimit

type RequestLimit struct {
	CPU    *int64 `json:"cpu,omitempty"`
	Memory *int64 `json:"memory,omitempty"`
}

Jump to

Keyboard shortcuts

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