Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ffi.AttachConfig `yaml:",inline"`
// Endpoint is the gRPC endpoint address
Endpoint xcfg.NonEmptyString `yaml:"endpoint"`
}
Config represents plain device configuration
type DeviceConfig ¶
type DeviceConfig struct {
// contains filtered or unexported fields
}
DeviceConfig wraps C module configuration
func NewDeviceConfig ¶
func NewDeviceConfig( agent *ffi.Agent, name string, device *commonpb.Device, ) ( *DeviceConfig, error, )
NewDeviceConfig creates a new balancer module configuration
func UpdateDevices ¶
func UpdateDevices(agent *ffi.Agent, devices []ffi.DeviceConfig) ([]*DeviceConfig, error)
UpdateDevices creates one plain device per configuration and publishes them all in a single configuration update, returning the created handles in order.
The caller becomes the owner of the returned handles: each device is referenced by the live generation, so freeing a handle now is refused with ffi.ErrStillReferenced and the owner must retry once the generations drain. On failure every handle is destroyed here — the devices were never registered — and nil is returned.
func (*DeviceConfig) AsFFIDevice ¶
func (m *DeviceConfig) AsFFIDevice() ffi.ShmDeviceConfig
AsFFIDevice returns the module configuration as an FFI module
func (*DeviceConfig) Free ¶
func (m *DeviceConfig) Free() error
Free destroys the device, or reports ffi.ErrStillReferenced while a live generation still holds it. Safe to call multiple times.
type DevicePlainDevice ¶
type DevicePlainDevice struct {
// contains filtered or unexported fields
}
DevicePlainDevice is a control-plane component responsible for plain devices
func NewDevicePlainDevice ¶
func NewDevicePlainDevice(cfg *Config, options ...Option) (*DevicePlainDevice, error)
NewDevicePlainDevice creates a new DevicePlain device instance
func (*DevicePlainDevice) Close ¶
func (m *DevicePlainDevice) Close() error
Close closes the device and releases all resources
func (*DevicePlainDevice) Endpoint ¶
func (m *DevicePlainDevice) Endpoint() string
func (*DevicePlainDevice) Name ¶
func (m *DevicePlainDevice) Name() string
func (*DevicePlainDevice) RegisterService ¶
func (m *DevicePlainDevice) RegisterService(server *grpc.Server)
func (*DevicePlainDevice) ServicesNames ¶
func (m *DevicePlainDevice) ServicesNames() []string
type DevicePlainService ¶
type DevicePlainService struct {
plainpb.UnimplementedDevicePlainServiceServer
// contains filtered or unexported fields
}
DevicePlainService implements the DevicePlain gRPC service.
func NewDevicePlainService ¶
func NewDevicePlainService(agent *ffi.Agent) *DevicePlainService
func (*DevicePlainService) ShowDevice ¶ added in v0.1.0
func (m *DevicePlainService) ShowDevice( ctx context.Context, request *plainpb.ShowDevicePlainRequest, ) (*plainpb.ShowDevicePlainResponse, error)
ShowDevice returns the pipeline bindings of the plain device with the given name, read from the dataplane's live device registry rather than this service's in-memory state.
func (*DevicePlainService) UpdateDevice ¶
func (m *DevicePlainService) UpdateDevice( ctx context.Context, request *plainpb.UpdateDevicePlainRequest, ) (*plainpb.UpdateDevicePlainResponse, error)