Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { io.Closer WriteClient ReadClient StreamClient PipelineConfigClient Capabilities(ctx context.Context, request *p4api.CapabilitiesRequest, opts ...grpc.CallOption) (*p4api.CapabilitiesResponse, error) }
Client P4runtime client interface
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 :
Click to show internal directories.
Click to hide internal directories.