Documentation ¶
Index ¶
- Variables
- func ConnectRuntime() (*runtime, error)
- func ContainerEvent(kind, pod, ctr string) *event
- func CreateContainerEvent(pod, ctr string) *event
- func NewPlugin(namespace string, options ...PluginOption) *plugin
- func PodEvent(kind, pod string) *event
- func PostCreateContainerEvent(pod, ctr string) *event
- func PostStartContainerEvent(pod, ctr string) *event
- func PostUpdateContainerEvent(pod, ctr string) *event
- func RemoveContainerEvent(pod, ctr string) *event
- func RemovePodEvent(pod string) *event
- func RunPodEvent(pod string) *event
- func StartContainerEvent(pod, ctr string) *event
- func StopContainerEvent(pod, ctr string) *event
- func StopPodEvent(pod string) *event
- func UpdateContainerEvent(pod, ctr string) *event
- type ContainerOption
- func WithAnnotations(annotations map[string]string) ContainerOption
- func WithArgs(args ...string) ContainerOption
- func WithCommand(cmd ...string) ContainerOption
- func WithEnv(envs []*cri.KeyValue) ContainerOption
- func WithImage(image string) ContainerOption
- func WithLabels(labels map[string]string) ContainerOption
- func WithResources(r *cri.LinuxContainerResources) ContainerOption
- func WithSecurityContext(c *cri.LinuxContainerSecurityContext) ContainerOption
- func WithShellScript(cmd string) ContainerOption
- type PluginOption
- func WithCreateHandler(...) PluginOption
- func WithPostCreateHandler(fn func(*plugin, *api.PodSandbox, *api.Container) error) PluginOption
- func WithStopHandler(...) PluginOption
- func WithStubOptions(options ...stub.Option) PluginOption
- func WithTestNamespace(namespace string) PluginOption
- func WithUpdateHandler(...) PluginOption
- type PodOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PluginConfigEvent = &event{kind: "Configure"} PluginSyncedEvent = &event{kind: "Synchronize"} PluginClosedEvent = &event{kind: "Closed"} )
Functions ¶
func ConnectRuntime ¶
func ConnectRuntime() (*runtime, error)
func ContainerEvent ¶
func ContainerEvent(kind, pod, ctr string) *event
func CreateContainerEvent ¶
func CreateContainerEvent(pod, ctr string) *event
func NewPlugin ¶
func NewPlugin(namespace string, options ...PluginOption) *plugin
func PostCreateContainerEvent ¶
func PostCreateContainerEvent(pod, ctr string) *event
func PostStartContainerEvent ¶
func PostStartContainerEvent(pod, ctr string) *event
func PostUpdateContainerEvent ¶
func PostUpdateContainerEvent(pod, ctr string) *event
func RemoveContainerEvent ¶
func RemoveContainerEvent(pod, ctr string) *event
func RemovePodEvent ¶
func RemovePodEvent(pod string) *event
func RunPodEvent ¶
func RunPodEvent(pod string) *event
func StartContainerEvent ¶
func StartContainerEvent(pod, ctr string) *event
func StopContainerEvent ¶
func StopContainerEvent(pod, ctr string) *event
func StopPodEvent ¶
func StopPodEvent(pod string) *event
func UpdateContainerEvent ¶
func UpdateContainerEvent(pod, ctr string) *event
Types ¶
type ContainerOption ¶
type ContainerOption func(*cri.ContainerConfig) error
func WithAnnotations ¶
func WithAnnotations(annotations map[string]string) ContainerOption
func WithArgs ¶
func WithArgs(args ...string) ContainerOption
func WithCommand ¶
func WithCommand(cmd ...string) ContainerOption
func WithEnv ¶
func WithEnv(envs []*cri.KeyValue) ContainerOption
func WithImage ¶
func WithImage(image string) ContainerOption
func WithLabels ¶
func WithLabels(labels map[string]string) ContainerOption
func WithResources ¶
func WithResources(r *cri.LinuxContainerResources) ContainerOption
func WithSecurityContext ¶
func WithSecurityContext(c *cri.LinuxContainerSecurityContext) ContainerOption
func WithShellScript ¶
func WithShellScript(cmd string) ContainerOption
type PluginOption ¶
type PluginOption func(*plugin)
func WithCreateHandler ¶
func WithCreateHandler(fn func(*plugin, *api.PodSandbox, *api.Container) (*api.ContainerAdjustment, []*api.ContainerUpdate, error)) PluginOption
func WithPostCreateHandler ¶
func WithPostCreateHandler(fn func(*plugin, *api.PodSandbox, *api.Container) error) PluginOption
func WithStopHandler ¶
func WithStopHandler(fn func(*plugin, *api.PodSandbox, *api.Container) ([]*api.ContainerUpdate, error)) PluginOption
func WithStubOptions ¶
func WithStubOptions(options ...stub.Option) PluginOption
func WithTestNamespace ¶
func WithTestNamespace(namespace string) PluginOption
func WithUpdateHandler ¶
func WithUpdateHandler(fn func(*plugin, *api.PodSandbox, *api.Container) ([]*api.ContainerUpdate, error)) PluginOption
type PodOption ¶
type PodOption func(*cri.PodSandboxConfig) error
func WithPodAnnotations ¶
func WithPodLabels ¶
Click to show internal directories.
Click to hide internal directories.