server

package
v0.1.0-latest-stable Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIHandler

type APIHandler interface {
	os.OSServer
	system.SystemServer
	gnmi.GNMIServer
}

type ConfigurableAPIHandler

type ConfigurableAPIHandler struct {
	os.UnimplementedOSServer
	system.UnimplementedSystemServer
	gnmi.UnimplementedGNMIServer

	sync.RWMutex
	Config config.Config
	// contains filtered or unexported fields
}

func (*ConfigurableAPIHandler) Activate

func (*ConfigurableAPIHandler) Get

Get is a mock implementation of the DMS API. TODO: remove the whole DMS API mock because they are now used by the host agent rather than the provisioning controller.

func (*ConfigurableAPIHandler) Install

func (*ConfigurableAPIHandler) RebootStatus

func (*ConfigurableAPIHandler) Set

type DMSAPICommand

type DMSAPICommand string
const (
	DefaultCommand           DMSAPICommand = "DefaultCommand"
	DPUCapacityCommand       DMSAPICommand = "DPUCapacityCommand"
	PCIRescanRequiredCommand DMSAPICommand = "PCIRescanRequired"
	CurrentFWVersionCommand  DMSAPICommand = "CurrentFWVersion"
	RunningFWVersionCommand  DMSAPICommand = "RunningFWVersion"
	HostNetworkConfigCommand DMSAPICommand = "HostNetworkConfig"
	HostNetworDeleteCommand  DMSAPICommand = "HostNetworkDelete"
)

type DMSServerMux

type DMSServerMux struct {
	*grpc.Server
	ListenerManager
	// contains filtered or unexported fields
}

func NewDMSServerMux

func NewDMSServerMux(ip string, cert *x509.Certificate, key *rsa.PrivateKey, listenerManager ListenerManager, handler APIHandler) *DMSServerMux

func (*DMSServerMux) ServeForDPUNode

func (d *DMSServerMux) ServeForDPUNode(dpuNode *provisioningv1.DPUNode, listener net.Listener) error

ServeForDPUNode creates allocates a port for a given DPU node and updates the DPUNode spec to point to the port.

type DPUNodeToPortListener

type DPUNodeToPortListener struct {
	sync.RWMutex
	// MinPort is the highest port number the DMSServerMux can use when creating listeners.
	MinPort uint16 // Minimum port number for use when creating listener instances.
	// MaxPort is the highest port number the DMSServerMux can use when creating listeners.
	MaxPort uint16
	// contains filtered or unexported fields
}

func (*DPUNodeToPortListener) AllocateListener

func (d *DPUNodeToPortListener) AllocateListener() (net.Listener, error)

type ListenerManager

type ListenerManager interface {
	AllocateListener() (net.Listener, error)
}

type Server

type Server interface {
	ServeForDPUNode(*provisioningv1.DPUNode, net.Listener) error
}

Jump to

Keyboard shortcuts

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