bridge

package
v0.14.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 34 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCRIMounts

func DefaultCRIMounts() []oci.Mount

DefaultCRIMounts returns default mounts added to windows spec by containerD.

func DefaultCRIPrivilegedMounts

func DefaultCRIPrivilegedMounts() []oci.Mount

DefaultCRIPrivilegedMounts returns a slice of mounts which are added to the windows container spec when a container runs in a privileged mode.

func UnknownMessage

func UnknownMessage(r *request) error

UnknownMessage represents the default handler logic for an unmatched request type sent from the bridge.

Types

type Bridge

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

func NewBridge

func NewBridge(shimConn io.ReadWriteCloser, inboxGCSConn io.ReadWriteCloser, initialEnforcer securitypolicy.SecurityPolicyEnforcer) *Bridge

func (*Bridge) AssignHandlers

func (b *Bridge) AssignHandlers()

AssignHandlers creates and assigns appropriate event handlers for the different bridge message types.

func (*Bridge) Handle

func (b *Bridge) Handle(rpcProcID prot.RPCProc, handlerFunc HandlerFunc)

Handle registers the handler for the given message id and protocol version.

func (*Bridge) HandleFunc

func (b *Bridge) HandleFunc(rpcProcID prot.RPCProc, handler func(*request) error)

func (*Bridge) ListenAndServeShimRequests

func (b *Bridge) ListenAndServeShimRequests() error

ListenAndServeShimRequests listens to messages on the hcsshim and inbox GCS connections and schedules them for processing. After processing, messages are forwarded to inbox GCS on success and responses from inbox GCS or error messages are sent back to hcsshim via bridge connection.

func (*Bridge) ServeMsg

func (b *Bridge) ServeMsg(r *request) error

ServeMsg serves request by calling appropriate handler functions.

type HandlerFunc

type HandlerFunc func(*request) error

HandlerFunc is an adapter to use functions as handlers.

type Host

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

func NewHost

func NewHost(initialEnforcer securitypolicy.SecurityPolicyEnforcer) *Host

func (*Host) SetWCOWConfidentialUVMOptions

func (h *Host) SetWCOWConfidentialUVMOptions(securityPolicyRequest *guestresource.WCOWConfidentialOptions) error

type SecurityPolicyEnforcer

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

func NewPolicyEnforcer

func NewPolicyEnforcer(initialEnforcer securitypolicy.SecurityPolicyEnforcer) *SecurityPolicyEnforcer

Jump to

Keyboard shortcuts

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