model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

type Deployment struct {
	Generation int64
	Phase      string

	model.Deployment `bson:",inline"`

	*Event `bson:",inline,omitempty"`
}

Deployment represents observable deployment data.

type Event

type Event struct {
	Reason  string
	Type    string
	Message string
	Count   int
}

Event represents common fields for kubernetes events.

type Ingress

type Ingress struct {
	model.Ingress `bson:",inline"`
}

Ingress represents observable ingress data.

type Metadata

type Metadata struct {
	ID           bson.ObjectId `bson:"_id"`
	EventType    watch.EventType
	ResourceType ObservableResource
	Timestamp    time.Time
	UID          string
	Namespace    string
	Name         string
}

Metadata represents common data for MongoDB record.

type Namespace

type Namespace struct {
	Quota model.Resources
}

Namespace represents observable namespace data.

type Node

type Node struct {
	Role       string
	Addresses  []v1.NodeAddress
	Conditions []v1.NodeCondition
}

Node represents observable kubernetes node data.

type Object

type Object interface{}

Object represents observable kubernetes resource.

type ObservableResource

type ObservableResource string

ObservableResource is set of constants representing kubernetes resource for watching.

const (
	ObservableNamespace        ObservableResource = "namespace"
	ObservableDeployment       ObservableResource = "deployment"
	ObservablePod              ObservableResource = "pod"
	ObservableService          ObservableResource = "service"
	ObservableIngress          ObservableResource = "ingress"
	ObservablePersistentVolume ObservableResource = "pv"
	ObservableNode             ObservableResource = "node"
)

type PersistentVolume

type PersistentVolume struct {
	Phase       string
	Capacity    int // GB
	AccessModes []v1.PersistentVolumeAccessMode
}

PersistentVolume represents observable pv data.

type Pod

type Pod struct {
	*Event `bson:",inline,omitempty"`
}

Pod represents observable deployment data.

type Record

type Record struct {
	Metadata `bson:",inline"`
	Object   Object `json:"object"`
}

Record represents MongoDB record (document).

func (*Record) UnmarshalJSON

func (r *Record) UnmarshalJSON(b []byte) error

UnmarshalJSON implements Unmarshaller.

type Service

type Service struct {
	model.Service `bson:",inline"`
}

Service represents observable service data.

Jump to

Keyboard shortcuts

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