Documentation ¶
Overview ¶
Package internal provides internal implementations of the replayer API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { GNMI gnmipb.GNMIClient GRIBI gribipb.GRIBIClient P4RT p4pb.P4RuntimeClient P4Info *p4infopb.P4Info }
Config holds configuration for the replay, including RPC clients for g* protocols.
type Event ¶
Event is one logged event from a binarylog.
func GenerateReplayEvents ¶
GenerateReplayEvents generates the list of events to be replayed in order. This will generate initial events from the recorded snapshots and generate later events by transforming the parsed events into ready-to-send events.
type Interface ¶
type Interface struct {
Name, Speed string
}
Interface is an interface present in a replay log.
type Recording ¶
type Recording struct {
// contains filtered or unexported fields
}
Recording is a parsed binary log.
func ParseBytes ¶
ParseBytes parses an SFE binary log with the specified bytes.
func (*Recording) FinalGRIBI ¶
func (r *Recording) FinalGRIBI() *gribipb.GetResponse
FinalGRIBI returns the final gRIBI GetResponse in the recorded log, representing the recorded final gRIBI state of the device.
func (*Recording) Interfaces ¶
Interfaces returns a map where the keys are interface names found in the gRIBI events and the values are the members of the bundle interface specified in the gNMI snapshot. If the key is not a bundle interface, the length of the slice will be zero.
func (*Recording) P4RTDevices ¶
P4RTDevices returns a list of the P4RT Device IDs that are programmed in the recording.
func (*Recording) SetInterfaceMap ¶
SetInterfaceMap sets the interfaces to be used during replay according to the input map. When replaying, any un-mapped interfaces and bundles containing unmapped interfaces will be ignored.
type Results ¶
type Results struct {
// contains filtered or unexported fields
}
Results contains the results of replayed requests.
func (*Results) FinalGRIBI ¶
func (r *Results) FinalGRIBI() *gribipb.GetResponse
FinalGRIBI returns the gRIBI GetResponse representing the gRIBI state on the device after replay.
func (*Results) GNMI ¶
func (r *Results) GNMI() []*gnmipb.SetResponse
GNMI returns the results from the replayed gNMI requests.