podlogs

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package api is the internal version of the API.

Index

Constants

This section is empty.

Variables

View Source
var (
	PodlogsPodStorage = builders.NewApiResource(
		InternalPod,
		func() runtime.Object { return &Pod{} },
		func() runtime.Object { return &PodList{} },
		&PodStrategy{builders.StorageStrategySingleton},
	)
	InternalPod = builders.NewInternalResource(
		"pods",
		"Pod",
		func() runtime.Object { return &Pod{} },
		func() runtime.Object { return &PodList{} },
	)
	InternalPodStatus = builders.NewInternalResourceStatus(
		"pods",
		"PodStatus",
		func() runtime.Object { return &Pod{} },
		func() runtime.Object { return &PodList{} },
	)
	InternalPodLogsREST = builders.NewInternalSubresource(
		"pods", "PodLogs", "logs",
		func() runtime.Object { return &PodLogs{} },
	)
	// Registered resources and subresources
	ApiVersion = builders.NewApiGroup("podlogs.example.com").WithKinds(
		InternalPod,
		InternalPodStatus,
		InternalPodLogsREST,
	)

	// Required by code generated by go2idl
	AddToScheme = (&runtime.SchemeBuilder{
		ApiVersion.SchemeBuilder.AddToScheme,
		RegisterDefaults,
	}).AddToScheme
	SchemeBuilder = ApiVersion.SchemeBuilder

	SchemeGroupVersion = ApiVersion.GroupVersion
)

Functions

func Kind

func Kind(kind string) schema.GroupKind

Required by code generated by go2idl Kind takes an unqualified kind and returns a Group qualified GroupKind

func LogLocation

func LogLocation(
	getter PodGetter,
	connInfo kubelet.ConnectionInfoGetter,
	ctx context.Context,
	name string,
	opts *PodLogs,
) (*url.URL, http.RoundTripper, error)

LogLocation returns the log URL for a pod container. If opts.Container is blank and only one container is present in the pod, that container is used.

func NewPodLogsREST

func NewPodLogsREST(getter generic.RESTOptionsGetter) rest.Storage

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Required by code generated by go2idl Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Pod

type Pod struct {
	metav1.TypeMeta
	metav1.ObjectMeta
	Spec   PodSpec
	Status PodStatus
}

func (*Pod) DeepCopy

func (in *Pod) DeepCopy() *Pod

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod.

func (*Pod) DeepCopyInto

func (in *Pod) DeepCopyInto(out *Pod)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Pod) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Pod) GetGeneration

func (pc Pod) GetGeneration() int64

func (*Pod) GetObjectMeta

func (pc *Pod) GetObjectMeta() *metav1.ObjectMeta

func (*Pod) GetSpec

func (pc *Pod) GetSpec() interface{}

func (*Pod) GetStatus

func (pc *Pod) GetStatus() interface{}

func (Pod) NewStatus

func (Pod) NewStatus() interface{}

func (*Pod) SetGeneration

func (pc *Pod) SetGeneration(generation int64)

func (*Pod) SetSpec

func (pc *Pod) SetSpec(s interface{})

func (*Pod) SetStatus

func (pc *Pod) SetStatus(s interface{})

type PodGetter

type PodGetter func(name string) (*corev1.Pod, error)

type PodList

type PodList struct {
	metav1.TypeMeta
	metav1.ListMeta
	Items []Pod
}

func (*PodList) DeepCopy

func (in *PodList) DeepCopy() *PodList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList.

func (*PodList) DeepCopyInto

func (in *PodList) DeepCopyInto(out *PodList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodList) DeepCopyObject

func (in *PodList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodLogs

type PodLogs struct {
	metav1.TypeMeta
	Container    string
	Follow       bool
	Previous     bool
	SinceSeconds *int64
	SinceTime    *metav1.Time
	Timestamps   bool
	TailLines    *int64
	LimitBytes   *int64
}

func (*PodLogs) DeepCopy

func (in *PodLogs) DeepCopy() *PodLogs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLogs.

func (*PodLogs) DeepCopyInto

func (in *PodLogs) DeepCopyInto(out *PodLogs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodLogs) DeepCopyObject

func (in *PodLogs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodLogsList

type PodLogsList struct {
	metav1.TypeMeta
	metav1.ListMeta
	Items []PodLogs
}

func (*PodLogsList) DeepCopy

func (in *PodLogsList) DeepCopy() *PodLogsList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLogsList.

func (*PodLogsList) DeepCopyInto

func (in *PodLogsList) DeepCopyInto(out *PodLogsList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodLogsList) DeepCopyObject

func (in *PodLogsList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodLogsREST

type PodLogsREST struct {
	KubeletConn kubelet.ConnectionInfoGetter
	// contains filtered or unexported fields
}

+k8s:deepcopy-gen=false

func (*PodLogsREST) Get

func (r *PodLogsREST) Get(ctx context.Context, name string, opts runtime.Object) (runtime.Object, error)

Connect returns a handler for the pod exec proxy

func (*PodLogsREST) New

func (r *PodLogsREST) New() runtime.Object

func (*PodLogsREST) NewGetOptions

func (r *PodLogsREST) NewGetOptions() (runtime.Object, bool, string)

type PodRegistry

type PodRegistry interface {
	ListPods(ctx context.Context, options *internalversion.ListOptions) (*PodList, error)
	GetPod(ctx context.Context, id string, options *metav1.GetOptions) (*Pod, error)
	CreatePod(ctx context.Context, id *Pod) (*Pod, error)
	UpdatePod(ctx context.Context, id *Pod) (*Pod, error)
	DeletePod(ctx context.Context, id string) (bool, error)
}

Registry is an interface for things that know how to store Pod. +k8s:deepcopy-gen=false

func NewPodRegistry

func NewPodRegistry(sp builders.StandardStorageProvider) PodRegistry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.

type PodSpec

type PodSpec struct {
}

func (*PodSpec) DeepCopy

func (in *PodSpec) DeepCopy() *PodSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.

func (*PodSpec) DeepCopyInto

func (in *PodSpec) DeepCopyInto(out *PodSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodStatus

type PodStatus struct {
}

func (*PodStatus) DeepCopy

func (in *PodStatus) DeepCopy() *PodStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus.

func (*PodStatus) DeepCopyInto

func (in *PodStatus) DeepCopyInto(out *PodStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodStatusStrategy

type PodStatusStrategy struct {
	builders.DefaultStatusStorageStrategy
}

+k8s:deepcopy-gen=false

type PodStrategy

type PodStrategy struct {
	builders.DefaultStorageStrategy
}

Pod Functions and Structs

+k8s:deepcopy-gen=false

func (PodStrategy) Validate

Validate checks that an instance of Pod is well formed

Directories

Path Synopsis
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/apiserver-builder-alpha/example/podlogs/pkg/apis/podlogs +k8s:defaulter-gen=TypeMeta +groupName=podlogs.example.com
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/apiserver-builder-alpha/example/podlogs/pkg/apis/podlogs +k8s:defaulter-gen=TypeMeta +groupName=podlogs.example.com

Jump to

Keyboard shortcuts

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