Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailurePolicyType ¶
type FailurePolicyType string
const ( // PolicyFail returns error to caller when got an error cri hook server PolicyFail FailurePolicyType = "Fail" // PolicyIgnore transfer cri request to containerd/dockerd when got an error to cri serer PolicyIgnore FailurePolicyType = "Ignore" // PolicyNone when no Policy configured. Proxy would ignore errors for PolicyNone like PolicyIgnore. PolicyNone = "" )
func GetFailurePolicyType ¶ added in v0.7.0
func GetFailurePolicyType(typeString string) (FailurePolicyType, error)
type Manager ¶
func NewConfigManager ¶
func NewConfigManager() *Manager
func (*Manager) GetAllHook ¶
func (m *Manager) GetAllHook() []*RuntimeHookConfig
type ManagerInterface ¶ added in v1.0.0
type ManagerInterface interface { GetAllHook() []*RuntimeHookConfig Run() error }
type RuntimeHookConfig ¶
type RuntimeHookConfig struct { RemoteEndpoint string `json:"remote-endpoint,omitempty"` FailurePolicy FailurePolicyType `json:"failure-policy,omitempty"` RuntimeHooks []RuntimeHookType `json:"runtime-hooks,omitempty"` }
type RuntimeHookConfigItem ¶
type RuntimeHookConfigItem struct { *RuntimeHookConfig // contains filtered or unexported fields }
type RuntimeHookStage ¶
type RuntimeHookStage string
const ( PreHook RuntimeHookStage = "PreHook" PostHook RuntimeHookStage = "PostHook" UnknownHook RuntimeHookStage = "UnknownHook" )
type RuntimeHookType ¶
type RuntimeHookType string
const ( PreRunPodSandbox RuntimeHookType = "PreRunPodSandbox" PostStopPodSandbox RuntimeHookType = "PostStopPodSandbox" PreCreateContainer RuntimeHookType = "PreCreateContainer" PreStartContainer RuntimeHookType = "PreStartContainer" PostStartContainer RuntimeHookType = "PostStartContainer" PreUpdateContainerResources RuntimeHookType = "PreUpdateContainerResources" PostStopContainer RuntimeHookType = "PostStopContainer" PreRemoveRunPodSandbox RuntimeHookType = "PreRemoveRunPodSandbox" NoneRuntimeHookType RuntimeHookType = "NoneRuntimeHookType" )
func (RuntimeHookType) HookStage ¶
func (ht RuntimeHookType) HookStage() RuntimeHookStage
func (RuntimeHookType) OccursOn ¶
func (ht RuntimeHookType) OccursOn(path RuntimeRequestPath) bool
type RuntimeRequestPath ¶
type RuntimeRequestPath string
const ( RunPodSandbox RuntimeRequestPath = "RunPodSandbox" StopPodSandbox RuntimeRequestPath = "StopPodSandbox" CreateContainer RuntimeRequestPath = "CreateContainer" StartContainer RuntimeRequestPath = "StartContainer" UpdateContainerResources RuntimeRequestPath = "UpdateContainerResources" StopContainer RuntimeRequestPath = "StopContainer" NoneRuntimeHookPath RuntimeRequestPath = "NoneRuntimeHookPath" )
func (RuntimeRequestPath) PostHookType ¶
func (hp RuntimeRequestPath) PostHookType() RuntimeHookType
func (RuntimeRequestPath) PreHookType ¶
func (hp RuntimeRequestPath) PreHookType() RuntimeHookType
Click to show internal directories.
Click to hide internal directories.