Documentation ¶
Overview ¶
Package fwdconfig contains builders for varius proto types.
Index ¶
- type ActionBuilder
- type ActionEntryBuilder
- type ContinueActionBuilder
- type DecapActionBuilder
- type DropActionBuilder
- type EncapActionBuilder
- type EntryDescBuilder
- type ExactEntryBuilder
- type FlowCounterActionBuilder
- type FlowEntryBuilder
- type LookupActionBuilder
- type PacketFieldBytesBuilder
- func (pfb *PacketFieldBytesBuilder) Build() *fwdpb.PacketFieldBytes
- func (pfb *PacketFieldBytesBuilder) WithBytes(b []byte) *PacketFieldBytesBuilder
- func (pfb *PacketFieldBytesBuilder) WithUint16(d uint16) *PacketFieldBytesBuilder
- func (pfb *PacketFieldBytesBuilder) WithUint32(d uint32) *PacketFieldBytesBuilder
- func (pfb *PacketFieldBytesBuilder) WithUint64(d uint64) *PacketFieldBytesBuilder
- type PacketFieldMaskedBytesBuilder
- func (b *PacketFieldMaskedBytesBuilder) Build() *fwdpb.PacketFieldMaskedBytes
- func (b *PacketFieldMaskedBytesBuilder) WithBytes(bytes, mask []byte) *PacketFieldMaskedBytesBuilder
- func (b *PacketFieldMaskedBytesBuilder) WithUint16(d uint16) *PacketFieldMaskedBytesBuilder
- func (b *PacketFieldMaskedBytesBuilder) WithUint32(d uint32) *PacketFieldMaskedBytesBuilder
- func (b *PacketFieldMaskedBytesBuilder) WithUint64(d uint64) *PacketFieldMaskedBytesBuilder
- type PrefixEntryBuilder
- type TableEntryAddRequestBuilder
- func (b *TableEntryAddRequestBuilder) AppendActions(actions ...*ActionBuilder) *TableEntryAddRequestBuilder
- func (b *TableEntryAddRequestBuilder) AppendEntry(entry *EntryDescBuilder, actions ...*ActionBuilder) *TableEntryAddRequestBuilder
- func (b TableEntryAddRequestBuilder) Build() *fwdpb.TableEntryAddRequest
- type TableEntryRemoveRequestBuilder
- type TransmitActionBuilder
- type UpdateActionBuilder
- func (u *UpdateActionBuilder) WithFieldIDInstance(i uint32) *UpdateActionBuilder
- func (u *UpdateActionBuilder) WithFieldIDNum(num fwdpb.PacketFieldNum) *UpdateActionBuilder
- func (u *UpdateActionBuilder) WithFieldSrc(num fwdpb.PacketFieldNum) *UpdateActionBuilder
- func (u *UpdateActionBuilder) WithFieldSrcInstance(i uint32) *UpdateActionBuilder
- func (u *UpdateActionBuilder) WithUint64Value(v uint64) *UpdateActionBuilder
- func (u *UpdateActionBuilder) WithUpdateType(t fwdpb.UpdateType) *UpdateActionBuilder
- func (u *UpdateActionBuilder) WithValue(v []byte) *UpdateActionBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionBuilder ¶
type ActionBuilder struct {
// contains filtered or unexported fields
}
ActionBuilder is a builder for forward action types.
func Action ¶
func Action(adb actionDescBuilder) *ActionBuilder
Action returns a new action builder.
func (*ActionBuilder) Build ¶
func (ab *ActionBuilder) Build() *fwdpb.ActionDesc
Build returns a new action.
func (*ActionBuilder) WithActionDesc ¶
func (ab *ActionBuilder) WithActionDesc(adb actionDescBuilder) *ActionBuilder
WithActionDesc sets the action description
type ActionEntryBuilder ¶
type ActionEntryBuilder struct {
// contains filtered or unexported fields
}
ActionEntryBuilder builds action table entries.
func ActionEntry ¶
func ActionEntry(id string, insertMethod fwdpb.ActionEntryDesc_InsertMethod) *ActionEntryBuilder
ActionEntry creates a new action entry builder.
type ContinueActionBuilder ¶ added in v0.5.0
type ContinueActionBuilder struct{}
ContinueActionBuilder is a builder for a continue action.
func ContinueAction ¶ added in v0.5.0
func ContinueAction() *ContinueActionBuilder
ContinueAction returns a new continue action builder.
type DecapActionBuilder ¶
type DecapActionBuilder struct {
// contains filtered or unexported fields
}
DecapActionBuilder is a builder for a lookup action.
func DecapAction ¶
func DecapAction(header fwdpb.PacketHeaderId) *DecapActionBuilder
LookupAction returns a new lookup action builder.
func (*DecapActionBuilder) WithHeaderID ¶
func (u *DecapActionBuilder) WithHeaderID(header fwdpb.PacketHeaderId) *DecapActionBuilder
WithHeaderID sets the header id.
type DropActionBuilder ¶
type DropActionBuilder struct{}
DropActionBuilder is a builder for a drop action.
func DropAction ¶
func DropAction() *DropActionBuilder
LookupAction returns a new drop action builder.
type EncapActionBuilder ¶
type EncapActionBuilder struct {
// contains filtered or unexported fields
}
EncapActionBuilder is a builder for a lookup action.
func EncapAction ¶
func EncapAction(header fwdpb.PacketHeaderId) *EncapActionBuilder
LookupAction returns a new lookup action builder.
func (*EncapActionBuilder) WithHeaderID ¶
func (u *EncapActionBuilder) WithHeaderID(header fwdpb.PacketHeaderId) *EncapActionBuilder
WithHeaderID sets the header id.
type EntryDescBuilder ¶
type EntryDescBuilder struct {
// contains filtered or unexported fields
}
EntryDesc returns a new EntryDescBuilder.
func EntryDesc ¶
func EntryDesc(e entryDescBuilder) *EntryDescBuilder
EntryDesc returns a new EntryDescBuilder.
func (EntryDescBuilder) Build ¶
func (edb EntryDescBuilder) Build() *fwdpb.EntryDesc
Build returns a new EntryDesc.
type ExactEntryBuilder ¶
type ExactEntryBuilder struct {
// contains filtered or unexported fields
}
ExactEntryBuilder builds exact table entries.
func ExactEntry ¶
func ExactEntry(fields ...*PacketFieldBytesBuilder) *ExactEntryBuilder
ExactEntry creates a new exact entry builder.
type FlowCounterActionBuilder ¶
type FlowCounterActionBuilder struct {
// contains filtered or unexported fields
}
FlowActionBuilder is a builder for a flow action.
func FlowCounterAction ¶
func FlowCounterAction(id string) *FlowCounterActionBuilder
FlowAction returns a new flow action builder.
type FlowEntryBuilder ¶
type FlowEntryBuilder struct {
// contains filtered or unexported fields
}
FlowEntryBuilder builds flow table entries.
func FlowEntry ¶
func FlowEntry(fields ...*PacketFieldMaskedBytesBuilder) *FlowEntryBuilder
FlowEntry creates a new flow entry builder.
type LookupActionBuilder ¶
type LookupActionBuilder struct {
// contains filtered or unexported fields
}
LookupActionBuilder is a builder for a lookup action.
func LookupAction ¶
func LookupAction(tableID string) *LookupActionBuilder
LookupAction returns a new lookup action builder.
func (*LookupActionBuilder) WithTableID ¶
func (u *LookupActionBuilder) WithTableID(id string) *LookupActionBuilder
WithTableID sets the table id.
type PacketFieldBytesBuilder ¶
type PacketFieldBytesBuilder struct {
// contains filtered or unexported fields
}
PacketFieldBytesBuilder is a builder for PacketFieldBytes.
func PacketFieldBytes ¶
func PacketFieldBytes(field fwdpb.PacketFieldNum) *PacketFieldBytesBuilder
PacketFieldBytes creates a new PacketFieldBytesBuilder
func (*PacketFieldBytesBuilder) Build ¶
func (pfb *PacketFieldBytesBuilder) Build() *fwdpb.PacketFieldBytes
Build returns a new PacketFieldBytes.
func (*PacketFieldBytesBuilder) WithBytes ¶
func (pfb *PacketFieldBytesBuilder) WithBytes(b []byte) *PacketFieldBytesBuilder
WithBytes sets the bytes value.
func (*PacketFieldBytesBuilder) WithUint16 ¶
func (pfb *PacketFieldBytesBuilder) WithUint16(d uint16) *PacketFieldBytesBuilder
WithUint16 sets the bytes value with big endian encoded uint.
func (*PacketFieldBytesBuilder) WithUint32 ¶
func (pfb *PacketFieldBytesBuilder) WithUint32(d uint32) *PacketFieldBytesBuilder
WithUint32 sets the bytes value with big endian encoded uint.
func (*PacketFieldBytesBuilder) WithUint64 ¶
func (pfb *PacketFieldBytesBuilder) WithUint64(d uint64) *PacketFieldBytesBuilder
WithUint64 sets the bytes value with big endian encoded uint.
type PacketFieldMaskedBytesBuilder ¶
type PacketFieldMaskedBytesBuilder struct {
// contains filtered or unexported fields
}
PacketFieldMaskedBytesBuilder is a builder for PacketFieldBytes.
func PacketFieldMaskedBytes ¶
func PacketFieldMaskedBytes(field fwdpb.PacketFieldNum) *PacketFieldMaskedBytesBuilder
PacketFieldMaskedBytes creates a new PacketFieldBytesBuilder
func (*PacketFieldMaskedBytesBuilder) Build ¶
func (b *PacketFieldMaskedBytesBuilder) Build() *fwdpb.PacketFieldMaskedBytes
Build returns a new PacketFieldMaskedBytes.
func (*PacketFieldMaskedBytesBuilder) WithBytes ¶
func (b *PacketFieldMaskedBytesBuilder) WithBytes(bytes, mask []byte) *PacketFieldMaskedBytesBuilder
WithBytes sets the bytes and mask value.
func (*PacketFieldMaskedBytesBuilder) WithUint16 ¶
func (b *PacketFieldMaskedBytesBuilder) WithUint16(d uint16) *PacketFieldMaskedBytesBuilder
WithUint16 sets the bytes value with big endian encoded uint and the mask to an exact match.
func (*PacketFieldMaskedBytesBuilder) WithUint32 ¶
func (b *PacketFieldMaskedBytesBuilder) WithUint32(d uint32) *PacketFieldMaskedBytesBuilder
WithUint32 sets the bytes value with big endian encoded uint and the mask to an exact match.
func (*PacketFieldMaskedBytesBuilder) WithUint64 ¶
func (b *PacketFieldMaskedBytesBuilder) WithUint64(d uint64) *PacketFieldMaskedBytesBuilder
WithUint64 sets the bytes value with big endian encoded uint and the mask to an exact match.
type PrefixEntryBuilder ¶
type PrefixEntryBuilder struct {
// contains filtered or unexported fields
}
PrefixEntryBuilder builds prefix table entries.
func PrefixEntry ¶
func PrefixEntry(fields ...*PacketFieldMaskedBytesBuilder) *PrefixEntryBuilder
PrefixEntry creates a new prefix entry builder.
type TableEntryAddRequestBuilder ¶
type TableEntryAddRequestBuilder struct {
// contains filtered or unexported fields
}
TableEntryAddRequest builds TableEntryAddRequests.
func TableEntryAddRequest ¶
func TableEntryAddRequest(ctxID, tableID string) *TableEntryAddRequestBuilder
TableEntryAddRequest creates a new TableEntryAddRequestBuilder.
func (*TableEntryAddRequestBuilder) AppendActions ¶
func (b *TableEntryAddRequestBuilder) AppendActions(actions ...*ActionBuilder) *TableEntryAddRequestBuilder
AppendEntry adds the actions to the requests.
func (*TableEntryAddRequestBuilder) AppendEntry ¶
func (b *TableEntryAddRequestBuilder) AppendEntry(entry *EntryDescBuilder, actions ...*ActionBuilder) *TableEntryAddRequestBuilder
AppendEntry adds an entry and the actions to the requests.
func (TableEntryAddRequestBuilder) Build ¶
func (b TableEntryAddRequestBuilder) Build() *fwdpb.TableEntryAddRequest
Build returns a new TableEntryAddRequest.
type TableEntryRemoveRequestBuilder ¶
type TableEntryRemoveRequestBuilder struct {
// contains filtered or unexported fields
}
TableEntryAddRequest builds TableEntryAddRequests.
func TableEntryRemoveRequest ¶
func TableEntryRemoveRequest(ctxID, tableID string) *TableEntryRemoveRequestBuilder
TableEntryRemoveRequest creates a new TableEntryRemoveRequestBuilder.
func (*TableEntryRemoveRequestBuilder) AppendEntry ¶
func (b *TableEntryRemoveRequestBuilder) AppendEntry(entry *EntryDescBuilder) *TableEntryRemoveRequestBuilder
AppendEntry adds an entry to the requests.
func (TableEntryRemoveRequestBuilder) Build ¶
func (b TableEntryRemoveRequestBuilder) Build() *fwdpb.TableEntryRemoveRequest
Build returns a new TableEntryAddRequest.
type TransmitActionBuilder ¶
type TransmitActionBuilder struct {
// contains filtered or unexported fields
}
TransmitActionBuilder is a builder for a transmit action.
func TransmitAction ¶
func TransmitAction(portID string) *TransmitActionBuilder
TransmitAction returns a new update action builder.
func (*TransmitActionBuilder) WithImmediate ¶
func (u *TransmitActionBuilder) WithImmediate(immediate bool) *TransmitActionBuilder
WithImmediate sets immediate option value.
func (*TransmitActionBuilder) WithPortID ¶
func (u *TransmitActionBuilder) WithPortID(id string) *TransmitActionBuilder
WithFieldIDNum sets the port id value.
type UpdateActionBuilder ¶
type UpdateActionBuilder struct {
// contains filtered or unexported fields
}
UpdateActionBuilder is a builder for an update action.
func UpdateAction ¶
func UpdateAction(t fwdpb.UpdateType, num fwdpb.PacketFieldNum) *UpdateActionBuilder
UpdateAction returns a new update action builder.
func (*UpdateActionBuilder) WithFieldIDInstance ¶
func (u *UpdateActionBuilder) WithFieldIDInstance(i uint32) *UpdateActionBuilder
WithFieldIDInstance sets the instance of the id num.
func (*UpdateActionBuilder) WithFieldIDNum ¶
func (u *UpdateActionBuilder) WithFieldIDNum(num fwdpb.PacketFieldNum) *UpdateActionBuilder
WithFieldIDNum sets the packet field id enum.
func (*UpdateActionBuilder) WithFieldSrc ¶
func (u *UpdateActionBuilder) WithFieldSrc(num fwdpb.PacketFieldNum) *UpdateActionBuilder
WithUpdateType sets the update source field id.
func (*UpdateActionBuilder) WithFieldSrcInstance ¶
func (u *UpdateActionBuilder) WithFieldSrcInstance(i uint32) *UpdateActionBuilder
WithFieldSrcInstance sets the instance of the src id num.
func (*UpdateActionBuilder) WithUint64Value ¶
func (u *UpdateActionBuilder) WithUint64Value(v uint64) *UpdateActionBuilder
WithUint64Value sets the value to a uint64 value.
func (*UpdateActionBuilder) WithUpdateType ¶
func (u *UpdateActionBuilder) WithUpdateType(t fwdpb.UpdateType) *UpdateActionBuilder
WithUpdateType sets the update type.
func (*UpdateActionBuilder) WithValue ¶
func (u *UpdateActionBuilder) WithValue(v []byte) *UpdateActionBuilder
WithUint64Value sets the value to a byte slice.