southbound

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

Client P4runtime client interface

type Conn

type Conn interface {
	Client
	ID() ConnID
	TargetID() topoapi.ID
}

Conn connection interface

type ConnID

type ConnID string

ConnID connection ID

type ConnManager

type ConnManager interface {
	Get(ctx context.Context, connID ConnID) (Conn, bool)
	GetByTarget(ctx context.Context, targetID topoapi.ID) (Client, error)
	Connect(ctx context.Context, target *topoapi.Object) error
	Disconnect(ctx context.Context, targetID topoapi.ID) error
	Watch(ctx context.Context, ch chan<- Conn) error
}

ConnManager p4rt connection manager

func NewConnManager

func NewConnManager() ConnManager

NewConnManager creates a new p4rt connection manager

type Destination

type Destination struct {
	// Addrs is a slice of addresses by which a target may be reached. Most
	// clients will only handle the first element.
	Addrs []string
	// TargetID is the topology target entity ID
	TargetID string
	// Timeout is the connection timeout
	Timeout time.Duration
	// TLS config to use when connecting to target.
	TLS *tls.Config
	// DeviceID is the numerical ID to be used for p4runtime API interactions
	DeviceID uint64
}

Destination contains data used to connect to a server

func (Destination) Validate

func (d Destination) Validate() error

Validate validates the fields of Destination.

type PipelineConfigClient

type PipelineConfigClient interface {
	SetForwardingPipelineConfig(ctx context.Context, request *p4api.SetForwardingPipelineConfigRequest, opts ...grpc.CallOption) (*p4api.SetForwardingPipelineConfigResponse, error)
	GetForwardingPipelineConfig(ctx context.Context, request *p4api.GetForwardingPipelineConfigRequest, opts ...grpc.CallOption) (*p4api.GetForwardingPipelineConfigResponse, error)
}

PipelineConfigClient :

type ReadClient

type ReadClient interface {
	ReadEntities(ctx context.Context, request *p4api.ReadRequest, ch chan *p4api.Entity, opts ...grpc.CallOption) error
}

ReadClient :

type StreamClient

type StreamClient interface {
	SendArbitrationRequest(deviceID uint64, electionID uint64, role string) error
	RecvArbitrationResponse() (*p4api.StreamMessageResponse_Arbitration, error)
	PacketIn(outputCh chan *p4api.PacketIn) error
	PacketOut(packetOut *p4api.PacketOut) error
}

StreamClient p4runtime master stream client

type WriteClient

type WriteClient interface {
	Write(ctx context.Context, request *p4api.WriteRequest, opts ...grpc.CallOption) (*p4api.WriteResponse, error)
}

WriteClient :

Jump to

Keyboard shortcuts

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