container

package
v0.0.0-...-ebbaa34 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RefManager

type RefManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

RefManager manages the references for the containers. The references are used for reporting events such as creation, failure, etc. This manager is thread-safe, no locks are necessary for the caller.

func NewRefManager

func NewRefManager() *RefManager

NewRefManager creates and returns a container reference manager with empty contents.

func (*RefManager) ClearRef

func (c *RefManager) ClearRef(id ContainerID)

ClearRef forgets the given container id and its associated container reference.

func (*RefManager) GetRef

func (c *RefManager) GetRef(id ContainerID) (ref *v1.ObjectReference, ok bool)

GetRef returns the container reference of the given ID, or (nil, false) if none is stored.

func (*RefManager) SetRef

func (c *RefManager) SetRef(id ContainerID, ref *v1.ObjectReference)

SetRef stores a reference to a pod's container, associating it with the given container ID.

Jump to

Keyboard shortcuts

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