@@ -45,11 +45,11 @@ type Shaper interface {
|
||||
// Limits are aggregate limits for the CIDR, not per IP address. CIDRs must be unique, but can be overlapping, traffic
|
||||
// that matches multiple CIDRs counts against all limits.
|
||||
Limit(cidr string, egress, ingress *resource.Quantity) error
|
||||
// Remove a bandwidth limit for a particular CIDR on a particular network interface
|
||||
// Reset removes a bandwidth limit for a particular CIDR on a particular network interface
|
||||
Reset(cidr string) error
|
||||
// Reconcile the interface managed by this shaper with the state on the ground.
|
||||
// ReconcileInterface reconciles the interface managed by this shaper with the state on the ground.
|
||||
ReconcileInterface() error
|
||||
// Reconcile a CIDR managed by this shaper with the state on the ground
|
||||
// ReconcileCIDR reconciles a CIDR managed by this shaper with the state on the ground
|
||||
ReconcileCIDR(cidr string, egress, ingress *resource.Quantity) error
|
||||
// GetCIDRs returns the set of CIDRs that are being managed by this shaper
|
||||
GetCIDRs() ([]string, error)
|
||||
|
||||
@@ -45,7 +45,7 @@ import (
|
||||
// PortForwarder knows how to forward content from a data stream to/from a port
|
||||
// in a pod.
|
||||
type PortForwarder interface {
|
||||
// PortForwarder copies data between a data stream and a port in a pod.
|
||||
// PortForward copies data between a data stream and a port in a pod.
|
||||
PortForward(name string, uid types.UID, port int32, stream io.ReadWriteCloser) error
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ func (fp *Failpoint) DelegatedEval() EvalFn {
|
||||
return target.evaluate
|
||||
}
|
||||
|
||||
// Failpoint returns the current state of control in string format.
|
||||
// Marshal returns the current state of control in string format.
|
||||
func (fp *Failpoint) Marshal() string {
|
||||
fp.Lock()
|
||||
defer fp.Unlock()
|
||||
|
||||
@@ -40,7 +40,7 @@ func NewNetNS(baseDir string) (*NetNS, error) {
|
||||
return &NetNS{path: hcnNamespace.Id}, nil
|
||||
}
|
||||
|
||||
// NewNetNS returns the netns from pid or a new netns if pid is 0.
|
||||
// NewNetNSFromPID returns the netns from pid or a new netns if pid is 0.
|
||||
func NewNetNSFromPID(baseDir string, pid uint32) (*NetNS, error) {
|
||||
return nil, errNotImplementedOnWindows
|
||||
}
|
||||
|
||||
@@ -31,13 +31,13 @@ import (
|
||||
// Domain implements the functions the generic NRI interface needs to
|
||||
// deal with pods and containers from a particular containerd namespace.
|
||||
type Domain interface {
|
||||
// GetName() returns the containerd namespace for this domain.
|
||||
// GetName returns the containerd namespace for this domain.
|
||||
GetName() string
|
||||
|
||||
// ListPodSandboxes list all pods in this namespace.
|
||||
// ListPodSandboxes lists all pods in this namespace.
|
||||
ListPodSandboxes() []PodSandbox
|
||||
|
||||
// ListContainer list all containers in this namespace.
|
||||
// ListContainers lists all containers in this namespace.
|
||||
ListContainers() []Container
|
||||
|
||||
// GetPodSandbox returns the pod for the given ID.
|
||||
|
||||
@@ -80,7 +80,7 @@ type API interface {
|
||||
// NotifyContainerExit handles the exit event of a container.
|
||||
NotifyContainerExit(context.Context, PodSandbox, Container)
|
||||
|
||||
// StopContainer relays container removal events to NRI.
|
||||
// RemoveContainer relays container removal events to NRI.
|
||||
RemoveContainer(context.Context, PodSandbox, Container) error
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ func WithNamedPrefix(name string, allowOverwrite bool) StoreOpt {
|
||||
}
|
||||
}
|
||||
|
||||
// WithNamedPrefix uses a named prefix to references images which only have a tag name
|
||||
// WithDigestRef uses a named prefix to references images which only have a tag name
|
||||
// reference in the annotation or check full references annotations against and
|
||||
// additionally may add a digest reference. Images with no references resolved
|
||||
// from matching annotations may be stored by digest.
|
||||
|
||||
@@ -208,7 +208,7 @@ func (j *ProgressTracker) MarkExists(desc ocispec.Descriptor) {
|
||||
|
||||
}
|
||||
|
||||
// Adds hierarchy information
|
||||
// AddChildren adds hierarchy information
|
||||
func (j *ProgressTracker) AddChildren(desc ocispec.Descriptor, children []ocispec.Descriptor) {
|
||||
if j == nil || len(children) == 0 {
|
||||
return
|
||||
|
||||
@@ -42,7 +42,7 @@ func init() {
|
||||
plugins.Register(&transfertypes.OCIRegistry{}, &OCIRegistry{})
|
||||
}
|
||||
|
||||
// Initialize with hosts, authorizer callback, and headers
|
||||
// NewOCIRegistry initializes with hosts, authorizer callback, and headers
|
||||
func NewOCIRegistry(ref string, headers http.Header, creds CredentialHelper) *OCIRegistry {
|
||||
// Create an authorizer
|
||||
var aopts []docker.AuthorizerOpt
|
||||
|
||||
Reference in New Issue
Block a user