sandbox

package
v0.0.0-...-89e5b94 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaData

type MetaData struct {
	// ID is the sandbox id.
	ID string `json:"id"`
	// Name is the sandbox name.
	Name string `json:"name"`
	// Config is the CRI sandbox config.
	Config *runtime.PodSandboxConfig `json:"config"`
	// IP of Pod if it is attached to non host network
	IP string `json:"ip"`
	// Creation time
	CreatedAt time.Time `json:"createdAt"`
}

type Sandbox

type Sandbox struct {
	MetaData

	Bundle *layout.Bundle

	sync.RWMutex
	// contains filtered or unexported fields
}

Sandbox contains all resources associated with the sandbox. All methods to mutate the internal state are thread safe.

func NewSandbox

func NewSandbox(config *runtime.PodSandboxConfig, ip, rootDir string) (s *Sandbox, retErr error)

NewSandbox creates an internally used sandbox type.

func (*Sandbox) State

func (s *Sandbox) State() runtime.PodSandboxState

func (*Sandbox) Stop

func (s *Sandbox) Stop()

type State

type State uint32

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store stores all sandboxes.

func NewStore

func NewStore(sandboxRootDir string) *Store

NewStore creates a sandbox store.

func (*Store) Add

func (s *Store) Add(sb *Sandbox) error

Add a sandbox into the store.

func (*Store) Delete

func (s *Store) Delete(id string)

Delete deletes the sandbox with specified id.

func (*Store) Get

func (s *Store) Get(id string) (*Sandbox, bool)

Get returns the sandbox with specified id.

func (*Store) List

func (s *Store) List() []*Sandbox

List lists all sandboxes.

func (*Store) Monitor

func (s *Store) Monitor()

func (*Store) Stop

func (s *Store) Stop()

Jump to

Keyboard shortcuts

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