Documentation
¶
Index ¶
- type Backend
- type Config
- type DscpModule
- type DscpService
- func (m *DscpService) AddPrefixes(ctx context.Context, request *dscppb.AddPrefixesRequest) (*dscppb.AddPrefixesResponse, error)
- func (m *DscpService) DeleteConfig(ctx context.Context, request *dscppb.DeleteConfigRequest) (*dscppb.DeleteConfigResponse, error)
- func (m *DscpService) ListConfigs(ctx context.Context, request *dscppb.ListConfigsRequest) (*dscppb.ListConfigsResponse, error)
- func (m *DscpService) RemovePrefixes(ctx context.Context, request *dscppb.RemovePrefixesRequest) (*dscppb.RemovePrefixesResponse, error)
- func (m *DscpService) SetDscpMarking(ctx context.Context, request *dscppb.SetDscpMarkingRequest) (*dscppb.SetDscpMarkingResponse, error)
- func (m *DscpService) ShowConfig(ctx context.Context, request *dscppb.ShowConfigRequest) (*dscppb.ShowConfigResponse, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
// Update builds a module config from the prefix sets and the marking
// and publishes it to the dataplane.
Update(name string, payload *config) (crud.Handle, error)
// Delete removes a module config.
Delete(name string) error
}
Backend abstracts shared memory operations.
type Config ¶
type Config struct {
modulebase.BaseConfig `yaml:",inline"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
type DscpModule ¶
type DscpModule struct {
*modulebase.Base
}
DscpModule is a control-plane component of a module that is responsible for DSCP marking of packets.
func NewDSCPModule ¶
func NewDSCPModule(cfg *Config, options ...Option) (*DscpModule, error)
type DscpService ¶
type DscpService struct {
dscppb.UnimplementedDscpServiceServer
// contains filtered or unexported fields
}
func NewDscpService ¶
func NewDscpService(backend Backend) *DscpService
func (*DscpService) AddPrefixes ¶
func (m *DscpService) AddPrefixes( ctx context.Context, request *dscppb.AddPrefixesRequest, ) (*dscppb.AddPrefixesResponse, error)
func (*DscpService) DeleteConfig ¶
func (m *DscpService) DeleteConfig( ctx context.Context, request *dscppb.DeleteConfigRequest, ) (*dscppb.DeleteConfigResponse, error)
DeleteConfig removes the named config if it is not referenced by any pipeline.
func (*DscpService) ListConfigs ¶
func (m *DscpService) ListConfigs( ctx context.Context, request *dscppb.ListConfigsRequest, ) (*dscppb.ListConfigsResponse, error)
func (*DscpService) RemovePrefixes ¶
func (m *DscpService) RemovePrefixes( ctx context.Context, request *dscppb.RemovePrefixesRequest, ) (*dscppb.RemovePrefixesResponse, error)
func (*DscpService) SetDscpMarking ¶
func (m *DscpService) SetDscpMarking( ctx context.Context, request *dscppb.SetDscpMarkingRequest, ) (*dscppb.SetDscpMarkingResponse, error)
func (*DscpService) ShowConfig ¶
func (m *DscpService) ShowConfig( ctx context.Context, request *dscppb.ShowConfigRequest, ) (*dscppb.ShowConfigResponse, error)