dscp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func (*Config) Default

func (m *Config) Default()

Default resets Config to DefaultConfig.

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 (*DscpService) SetDscpMarking

func (*DscpService) ShowConfig

func (m *DscpService) ShowConfig(
	ctx context.Context,
	request *dscppb.ShowConfigRequest,
) (*dscppb.ShowConfigResponse, error)

type Option

type Option = modulebase.Option

Option configures the DscpModule constructor.

func WithLog

func WithLog(log *zap.Logger) Option

WithLog sets the logger for the dscp module.

Directories

Path Synopsis
dscppb
v1

Jump to

Keyboard shortcuts

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