Documentation
¶
Index ¶
- Constants
- func IsNotFoundContainerError(err error) bool
- func RecoverContainer(ctx context.Context, client *containerd.Client, cb *cubeboxstore.CubeBox, ...) (*cubeboxstore.Container, error)
- func RecoverPod(ctx context.Context, client *containerd.Client, cb *cubeboxstore.CubeBox) (err error)
- func WithNoEvent(o *CubeboxSaveOptions)
- type ContainerdClientSetter
- type CubeboxAPI
- type CubeboxEvent
- type CubeboxEventListener
- type CubeboxEventListenerRegistry
- type CubeboxSaveOptions
- type DeleteOption
- type RocoverCubebox
- type UpdateCubeboxOpt
Constants ¶
View Source
const (
CubeboxEventTypeUpdate = "UPDATE"
)
Variables ¶
This section is empty.
Functions ¶
func RecoverContainer ¶
func RecoverContainer(ctx context.Context, client *containerd.Client, cb *cubeboxstore.CubeBox, ctr *cubeboxstore.Container) (*cubeboxstore.Container, error)
func RecoverPod ¶
func RecoverPod(ctx context.Context, client *containerd.Client, cb *cubeboxstore.CubeBox) (err error)
func WithNoEvent ¶
func WithNoEvent(o *CubeboxSaveOptions)
Types ¶
type ContainerdClientSetter ¶
type ContainerdClientSetter interface {
SetContainerdClient(client *containerd.Client)
}
type CubeboxAPI ¶
type CubeboxAPI interface {
Init(ctx context.Context) error
Get(ctx context.Context, id string) (*cubeboxstore.CubeBox, error)
FindContainerOfCubebox(ctx context.Context, ID string) (*cubeboxstore.Container, *cubeboxstore.CubeBox, error)
List() []*cubeboxstore.CubeBox
IsImageInUse(imageID string) (bool, error)
Save(ctx context.Context, info *cubeboxstore.CubeBox, opts ...UpdateCubeboxOpt) error
SyncByID(ctx context.Context, id string, opts ...UpdateCubeboxOpt) error
Delete(ctx context.Context, opt *DeleteOption) error
}
type CubeboxEvent ¶
type CubeboxEvent struct {
EventType string
Cubebox *cubeboxstore.CubeBox
}
type CubeboxEventListener ¶
type CubeboxEventListener interface {
OnCubeboxEvent(ctx context.Context, event *CubeboxEvent) error
}
type CubeboxEventListenerRegistry ¶
type CubeboxEventListenerRegistry interface {
Register(listener CubeboxEventListener)
}
type CubeboxSaveOptions ¶
type CubeboxSaveOptions struct {
NoEvent bool
}
type DeleteOption ¶
type RocoverCubebox ¶
type UpdateCubeboxOpt ¶
type UpdateCubeboxOpt func(*CubeboxSaveOptions)
Click to show internal directories.
Click to hide internal directories.