v1

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PodCrd = crd.NewCrd("core.kubernetes.io",
	"pods",
	"core.kubernetes.io",
	"v1",
	"Pod",
	"pod",
	false,
	&Pod{})

Functions

This section is empty.

Types

type Pod

type Pod struct {
	// Metadata contains the object metadata for this resource
	Metadata core.Metadata `protobuf:"bytes,101,opt,name=metadata,proto3" json:"metadata"`
	// the kubernetes pod spec as an inline json string
	Spec string `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
	// the kubernetes pod status as an inline json string
	Status               string   `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Intermediary proto representation of a kubernetes pod. Used to integrate solo-kit with kubernetes API

func NewPod

func NewPod(namespace, name string) *Pod

TODO: modify as needed to populate additional fields

func (*Pod) DeepCopyObject

func (o *Pod) DeepCopyObject() runtime.Object

func (*Pod) Descriptor

func (*Pod) Descriptor() ([]byte, []int)

func (*Pod) Equal

func (this *Pod) Equal(that interface{}) bool

func (*Pod) GetMetadata

func (m *Pod) GetMetadata() core.Metadata

func (*Pod) GetObjectKind

func (o *Pod) GetObjectKind() schema.ObjectKind

func (*Pod) GetSpec

func (m *Pod) GetSpec() string

func (*Pod) GetStatus

func (m *Pod) GetStatus() string

func (*Pod) Hash

func (r *Pod) Hash() uint64

func (*Pod) ProtoMessage

func (*Pod) ProtoMessage()

func (*Pod) Reset

func (m *Pod) Reset()

func (*Pod) SetMetadata

func (r *Pod) SetMetadata(meta core.Metadata)

func (*Pod) String

func (m *Pod) String() string

func (*Pod) XXX_DiscardUnknown

func (m *Pod) XXX_DiscardUnknown()

func (*Pod) XXX_Marshal

func (m *Pod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pod) XXX_Merge

func (m *Pod) XXX_Merge(src proto.Message)

func (*Pod) XXX_Size

func (m *Pod) XXX_Size() int

func (*Pod) XXX_Unmarshal

func (m *Pod) XXX_Unmarshal(b []byte) error

type PodClient

type PodClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*Pod, error)
	Write(resource *Pod, opts clients.WriteOpts) (*Pod, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (PodList, error)
	Watch(namespace string, opts clients.WatchOpts) (<-chan PodList, <-chan error, error)
}

func NewPodClient

func NewPodClient(rcFactory factory.ResourceClientFactory) (PodClient, error)

func NewPodClientWithBase

func NewPodClientWithBase(rc clients.ResourceClient) PodClient

func NewPodClientWithToken

func NewPodClientWithToken(rcFactory factory.ResourceClientFactory, token string) (PodClient, error)

type PodList

type PodList []*Pod

func (PodList) AsInterfaces

func (list PodList) AsInterfaces() []interface{}

func (PodList) AsResources

func (list PodList) AsResources() resources.ResourceList

func (PodList) Clone

func (list PodList) Clone() PodList

func (PodList) Each

func (list PodList) Each(f func(element *Pod))

func (PodList) Find

func (list PodList) Find(namespace, name string) (*Pod, error)

namespace is optional, if left empty, names can collide if the list contains more than one with the same name

func (PodList) Names

func (list PodList) Names() []string

func (PodList) NamespacesDotNames

func (list PodList) NamespacesDotNames() []string

func (PodList) Sort

func (list PodList) Sort() PodList

type PodReconciler

type PodReconciler interface {
	Reconcile(namespace string, desiredResources PodList, transition TransitionPodFunc, opts clients.ListOpts) error
}

func NewPodReconciler

func NewPodReconciler(client PodClient) PodReconciler

type PodsByNamespace

type PodsByNamespace map[string]PodList

func (PodsByNamespace) Add

func (byNamespace PodsByNamespace) Add(pod ...*Pod)

func (PodsByNamespace) Clear

func (byNamespace PodsByNamespace) Clear(namespace string)

func (PodsByNamespace) Clone

func (byNamespace PodsByNamespace) Clone() PodsByNamespace

func (PodsByNamespace) List

func (byNamespace PodsByNamespace) List() PodList

type TransitionPodFunc

type TransitionPodFunc func(original, desired *Pod) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

Jump to

Keyboard shortcuts

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