Documentation ¶
Index ¶
- Variables
- func CaptureIfaceTypeToProtoIfaceType(interfaceType string) (proto.CaptureInterfaceType, error)
- func FillCaptureIfaceInfo(interfaceInfo string, request *proto.CapturedInterface) error
- func InterfaceMeteringParamsToProtoMeteringParams(meteringParams *MeteringParams) *proto.MeteringParams
- func NetIPAddrToProtoIPConfig(addr *netip.Addr) *proto.IpConfig
- func NetIPAddrToProtoIPVersion(addr *netip.Addr) proto.IpVersion
- func NetIPAddrToProtoIpAddress(addr *netip.Addr) *proto.IpAddress
- func ProtoIfaceInfoToCaptureIfaceInfo(request *proto.CapturedInterface) (string, error)
- func ProtoIfaceTypeToCaptureIfaceType(interfaceType proto.CaptureInterfaceType) (string, error)
- func ProtoIpAddressToNetIPAddr(protoIP *proto.IpAddress) (*netip.Addr, error)
- func ProtoLBPrefixToProtoPrefix(lbprefix *proto.Prefix) *proto.Prefix
- type CaptureConfig
- type CaptureGetStatusSpec
- type CaptureInterface
- type CaptureStart
- type CaptureStartMeta
- type CaptureStartSpec
- type CaptureStatus
- type CaptureStatusMeta
- type CaptureStop
- type CaptureStopMeta
- type CaptureStopSpec
- type FirewallRule
- type FirewallRuleList
- type FirewallRuleListMeta
- type FirewallRuleMeta
- type FirewallRuleSpec
- type Initialized
- type InitializedMeta
- type InitializedSpec
- type Interface
- type InterfaceList
- type InterfaceListMeta
- type InterfaceMeta
- type InterfaceSpec
- type LBPort
- type List
- type LoadBalancer
- type LoadBalancerList
- type LoadBalancerListMeta
- type LoadBalancerMeta
- type LoadBalancerPrefix
- type LoadBalancerPrefixMeta
- type LoadBalancerPrefixSpec
- type LoadBalancerSpec
- type LoadBalancerTarget
- type LoadBalancerTargetList
- type LoadBalancerTargetListMeta
- type LoadBalancerTargetMeta
- type LoadBalancerTargetSpec
- type MeteringParams
- type Nat
- type NatList
- type NatListMeta
- type NatMeta
- type NatSpec
- type NeighborNat
- type NeighborNatMeta
- type NeighborNatSpec
- type Object
- type PXE
- type Prefix
- type PrefixList
- type PrefixListMeta
- type PrefixMeta
- type PrefixSpec
- type Route
- type RouteList
- type RouteListMeta
- type RouteMeta
- type RouteNextHop
- type RouteSpec
- type Status
- type TypeMeta
- type Version
- type VersionMeta
- type VersionSpec
- type VirtualFunction
- type VirtualIP
- type VirtualIPMeta
- type VirtualIPSpec
- type Vni
- type VniMeta
- type VniSpec
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InterfaceKind = reflect.TypeOf(Interface{}).Name() InterfaceListKind = reflect.TypeOf(InterfaceList{}).Name() LoadBalancerKind = reflect.TypeOf(LoadBalancer{}).Name() LoadBalancerListKind = reflect.TypeOf(LoadBalancerList{}).Name() LoadBalancerTargetKind = reflect.TypeOf(LoadBalancerTarget{}).Name() LoadBalancerTargetListKind = reflect.TypeOf(LoadBalancerTargetList{}).Name() LoadBalancerPrefixKind = reflect.TypeOf(LoadBalancerPrefix{}).Name() PrefixKind = reflect.TypeOf(Prefix{}).Name() PrefixListKind = reflect.TypeOf(PrefixList{}).Name() VirtualIPKind = reflect.TypeOf(VirtualIP{}).Name() RouteKind = reflect.TypeOf(Route{}).Name() RouteListKind = reflect.TypeOf(RouteList{}).Name() NatKind = reflect.TypeOf(Nat{}).Name() NatListKind = reflect.TypeOf(NatList{}).Name() NeighborNatKind = reflect.TypeOf(NeighborNat{}).Name() FirewallRuleKind = reflect.TypeOf(FirewallRule{}).Name() FirewallRuleListKind = reflect.TypeOf(FirewallRuleList{}).Name() InitializedKind = reflect.TypeOf(Initialized{}).Name() VniKind = reflect.TypeOf(Vni{}).Name() VersionKind = reflect.TypeOf(Version{}).Name() CaptureStartKind = reflect.TypeOf(CaptureStart{}).Name() CaptureStopKind = reflect.TypeOf(CaptureStop{}).Name() CaptureStatusKind = reflect.TypeOf(CaptureStatus{}).Name() )
Functions ¶
func CaptureIfaceTypeToProtoIfaceType ¶
func CaptureIfaceTypeToProtoIfaceType(interfaceType string) (proto.CaptureInterfaceType, error)
func FillCaptureIfaceInfo ¶
func FillCaptureIfaceInfo(interfaceInfo string, request *proto.CapturedInterface) error
func InterfaceMeteringParamsToProtoMeteringParams ¶
func InterfaceMeteringParamsToProtoMeteringParams(meteringParams *MeteringParams) *proto.MeteringParams
func ProtoIfaceInfoToCaptureIfaceInfo ¶
func ProtoIfaceInfoToCaptureIfaceInfo(request *proto.CapturedInterface) (string, error)
func ProtoIfaceTypeToCaptureIfaceType ¶
func ProtoIfaceTypeToCaptureIfaceType(interfaceType proto.CaptureInterfaceType) (string, error)
Types ¶
type CaptureConfig ¶
type CaptureGetStatusSpec ¶
type CaptureGetStatusSpec struct { OperationStatus bool `json:"operation_status"` Config CaptureConfig `json:"capture_config"` Interfaces []CaptureInterface `json:"interfaces,omitempty"` }
type CaptureInterface ¶
type CaptureStart ¶
type CaptureStart struct { TypeMeta `json:",inline"` CaptureStartMeta `json:"metadata"` Spec CaptureStartSpec `json:"spec"` Status Status `json:"status"` }
func (*CaptureStart) GetStatus ¶
func (m *CaptureStart) GetStatus() Status
type CaptureStartMeta ¶
type CaptureStartMeta struct {
Config *CaptureConfig `json:"capture_config"`
}
func (*CaptureStartMeta) GetName ¶
func (m *CaptureStartMeta) GetName() string
type CaptureStartSpec ¶
type CaptureStartSpec struct {
Interfaces []CaptureInterface `json:"interfaces,omitempty"`
}
type CaptureStatus ¶
type CaptureStatus struct { TypeMeta `json:",inline"` CaptureStatusMeta `json:"metadata"` Spec CaptureGetStatusSpec `json:"spec"` Status Status `json:"status"` }
func (*CaptureStatus) GetStatus ¶
func (m *CaptureStatus) GetStatus() Status
type CaptureStatusMeta ¶
type CaptureStatusMeta struct { }
func (*CaptureStatusMeta) GetName ¶
func (m *CaptureStatusMeta) GetName() string
type CaptureStop ¶
type CaptureStop struct { TypeMeta `json:",inline"` CaptureStopMeta `json:"metadata"` Spec CaptureStopSpec `json:"spec"` Status Status `json:"status"` }
func (*CaptureStop) GetStatus ¶
func (m *CaptureStop) GetStatus() Status
type CaptureStopMeta ¶
type CaptureStopMeta struct { }
func (*CaptureStopMeta) GetName ¶
func (m *CaptureStopMeta) GetName() string
type CaptureStopSpec ¶
type CaptureStopSpec struct {
InterfaceCount uint32 `json:"iface_cnt"`
}
type FirewallRule ¶
type FirewallRule struct { TypeMeta `json:",inline"` FirewallRuleMeta `json:"metadata"` Spec FirewallRuleSpec `json:"spec"` Status Status `json:"status"` }
FirewallRule section
func ProtoFwRuleToFwRule ¶
func ProtoFwRuleToFwRule(dpdkFwRule *proto.FirewallRule, interfaceID string) (*FirewallRule, error)
func (*FirewallRule) GetName ¶
func (m *FirewallRule) GetName() string
func (*FirewallRule) GetStatus ¶
func (m *FirewallRule) GetStatus() Status
type FirewallRuleList ¶
type FirewallRuleList struct { TypeMeta `json:",inline"` FirewallRuleListMeta `json:"metadata"` Status Status `json:"status"` Items []FirewallRule `json:"items"` }
func (*FirewallRuleList) GetItems ¶
func (l *FirewallRuleList) GetItems() []Object
func (*FirewallRuleList) GetStatus ¶
func (m *FirewallRuleList) GetStatus() Status
type FirewallRuleListMeta ¶
type FirewallRuleListMeta struct {
InterfaceID string `json:"interface_id"`
}
type FirewallRuleMeta ¶
type FirewallRuleMeta struct {
InterfaceID string `json:"interface_id"`
}
type FirewallRuleSpec ¶
type FirewallRuleSpec struct { RuleID string `json:"id"` TrafficDirection string `json:"direction,omitempty"` FirewallAction string `json:"action,omitempty"` Priority uint32 `json:"priority"` SourcePrefix *netip.Prefix `json:"source_prefix,omitempty"` DestinationPrefix *netip.Prefix `json:"destination_prefix,omitempty"` ProtocolFilter *proto.ProtocolFilter `json:"protocol_filter,omitempty"` }
type Initialized ¶
type Initialized struct { TypeMeta `json:",inline"` InitializedMeta `json:"metadata"` Spec InitializedSpec `json:"spec"` Status Status `json:"status"` }
Initialized section
func (*Initialized) GetStatus ¶
func (m *Initialized) GetStatus() Status
type InitializedMeta ¶
type InitializedMeta struct { }
func (*InitializedMeta) GetName ¶
func (m *InitializedMeta) GetName() string
type InitializedSpec ¶
type InitializedSpec struct {
UUID string `json:"uuid"`
}
type Interface ¶
type Interface struct { TypeMeta `json:",inline"` InterfaceMeta `json:"metadata"` Spec InterfaceSpec `json:"spec"` Status Status `json:"status"` }
Interface section
type InterfaceList ¶
type InterfaceList struct { TypeMeta `json:",inline"` InterfaceListMeta `json:"metadata"` Status Status `json:"status"` Items []Interface `json:"items"` }
func (*InterfaceList) GetItems ¶
func (l *InterfaceList) GetItems() []Object
func (*InterfaceList) GetStatus ¶
func (m *InterfaceList) GetStatus() Status
type InterfaceListMeta ¶
type InterfaceListMeta struct { }
type InterfaceMeta ¶
type InterfaceMeta struct {
ID string `json:"id"`
}
func (*InterfaceMeta) GetName ¶
func (m *InterfaceMeta) GetName() string
type InterfaceSpec ¶
type InterfaceSpec struct { VNI uint32 `json:"vni"` Device string `json:"device,omitempty"` IPv4 *netip.Addr `json:"primary_ipv4,omitempty"` IPv6 *netip.Addr `json:"primary_ipv6,omitempty"` UnderlayRoute *netip.Addr `json:"underlay_route,omitempty"` VirtualFunction *VirtualFunction `json:"virtual_function,omitempty"` PXE *PXE `json:"pxe,omitempty"` Nat *Nat `json:"-"` VIP *VirtualIP `json:"-"` Metering *MeteringParams `json:"metering,omitempty"` }
type LBPort ¶
func StringLbportToLbport ¶
type LoadBalancer ¶
type LoadBalancer struct { TypeMeta `json:",inline"` LoadBalancerMeta `json:"metadata"` Spec LoadBalancerSpec `json:"spec"` Status Status `json:"status"` }
LoadBalancer section
func ProtoLoadBalancerRequestToLoadBalancer ¶ added in v0.3.9
func ProtoLoadBalancerRequestToLoadBalancer(dpdkLB *proto.GetLoadBalancerResponse, lbID string) (*LoadBalancer, error)
func ProtoLoadBalancerToLoadBalancer ¶
func ProtoLoadBalancerToLoadBalancer(dpdkLB *proto.Loadbalancer) (*LoadBalancer, error)
func (*LoadBalancer) GetStatus ¶
func (m *LoadBalancer) GetStatus() Status
type LoadBalancerList ¶ added in v0.3.9
type LoadBalancerList struct { TypeMeta `json:",inline"` LoadBalancerListMeta `json:"metadata"` Status Status `json:"status"` Items []LoadBalancer `json:"items"` }
func (*LoadBalancerList) GetItems ¶ added in v0.3.9
func (l *LoadBalancerList) GetItems() []Object
func (*LoadBalancerList) GetStatus ¶ added in v0.3.9
func (m *LoadBalancerList) GetStatus() Status
type LoadBalancerListMeta ¶ added in v0.3.9
type LoadBalancerListMeta struct { }
type LoadBalancerMeta ¶
type LoadBalancerMeta struct {
ID string `json:"id"`
}
func (*LoadBalancerMeta) GetName ¶
func (m *LoadBalancerMeta) GetName() string
type LoadBalancerPrefix ¶
type LoadBalancerPrefix struct { TypeMeta `json:",inline"` LoadBalancerPrefixMeta `json:"metadata"` Spec LoadBalancerPrefixSpec `json:"spec"` Status Status `json:"status"` }
func (*LoadBalancerPrefix) GetName ¶
func (m *LoadBalancerPrefix) GetName() string
func (*LoadBalancerPrefix) GetStatus ¶
func (m *LoadBalancerPrefix) GetStatus() Status
type LoadBalancerPrefixMeta ¶
type LoadBalancerPrefixMeta struct {
InterfaceID string `json:"interface_id"`
}
type LoadBalancerPrefixSpec ¶
type LoadBalancerSpec ¶
type LoadBalancerTarget ¶
type LoadBalancerTarget struct { TypeMeta `json:",inline"` LoadBalancerTargetMeta `json:"metadata"` Spec LoadBalancerTargetSpec `json:"spec"` Status Status `json:"status"` }
func (*LoadBalancerTarget) GetName ¶
func (m *LoadBalancerTarget) GetName() string
func (*LoadBalancerTarget) GetStatus ¶
func (m *LoadBalancerTarget) GetStatus() Status
type LoadBalancerTargetList ¶
type LoadBalancerTargetList struct { TypeMeta `json:",inline"` LoadBalancerTargetListMeta `json:"metadata"` Status Status `json:"status"` Items []LoadBalancerTarget `json:"items"` }
func (*LoadBalancerTargetList) GetItems ¶
func (l *LoadBalancerTargetList) GetItems() []Object
func (*LoadBalancerTargetList) GetStatus ¶
func (m *LoadBalancerTargetList) GetStatus() Status
type LoadBalancerTargetListMeta ¶
type LoadBalancerTargetListMeta struct {
LoadBalancerID string `json:"loadbalancer_id"`
}
type LoadBalancerTargetMeta ¶
type LoadBalancerTargetMeta struct {
LoadbalancerID string `json:"loadbalancer_id"`
}
type LoadBalancerTargetSpec ¶
type MeteringParams ¶
type MeteringParams struct { TotalRate uint64 `json:"total_rate,omitempty"` PublicRate uint64 `json:"public_rate,omitempty"` }
func ProtoMeteringParamsToInterfaceMeteringParams ¶
func ProtoMeteringParamsToInterfaceMeteringParams(meteringParams *proto.MeteringParams) *MeteringParams
type Nat ¶
type Nat struct { TypeMeta `json:",inline"` NatMeta `json:"metadata"` Spec NatSpec `json:"spec"` Status Status `json:"status"` }
NAT section
func ProtoNatToNat ¶
func ProtoNatToNat(dpdkNat *proto.GetNatResponse, interfaceID string) (*Nat, error)
type NatList ¶
type NatList struct { TypeMeta `json:",inline"` NatListMeta `json:"metadata"` Status Status `json:"status"` Items []Nat `json:"items"` }
type NatListMeta ¶
type NeighborNat ¶
type NeighborNat struct { TypeMeta `json:",inline"` NeighborNatMeta `json:"metadata"` Spec NeighborNatSpec `json:"spec"` Status Status `json:"status"` }
func (*NeighborNat) GetStatus ¶
func (m *NeighborNat) GetStatus() Status
type NeighborNatMeta ¶
func (*NeighborNatMeta) GetName ¶
func (m *NeighborNatMeta) GetName() string
type NeighborNatSpec ¶
type Prefix ¶
type Prefix struct { TypeMeta `json:",inline"` PrefixMeta `json:"metadata"` Spec PrefixSpec `json:"spec"` Status Status `json:"status"` }
func ProtoPrefixToPrefix ¶
type PrefixList ¶
type PrefixList struct { TypeMeta `json:",inline"` PrefixListMeta `json:"metadata"` Status Status `json:"status"` Items []Prefix `json:"items"` }
Prefix section
func (*PrefixList) GetItems ¶
func (l *PrefixList) GetItems() []Object
func (*PrefixList) GetStatus ¶
func (m *PrefixList) GetStatus() Status
type PrefixListMeta ¶
type PrefixListMeta struct {
InterfaceID string `json:"interface_id"`
}
type PrefixMeta ¶
type PrefixMeta struct {
InterfaceID string `json:"interface_id"`
}
type PrefixSpec ¶
type Route ¶
type RouteList ¶
type RouteList struct { TypeMeta `json:",inline"` RouteListMeta `json:"metadata"` Status Status `json:"status"` Items []Route `json:"items"` }
Route section
type RouteListMeta ¶
type RouteListMeta struct {
VNI uint32 `json:"vni"`
}
type RouteNextHop ¶
type RouteSpec ¶
type RouteSpec struct { Prefix *netip.Prefix `json:"prefix,omitempty"` NextHop *RouteNextHop `json:"next_hop,omitempty"` }
type Status ¶
func ProtoStatusToStatus ¶
type Version ¶
type Version struct { TypeMeta `json:",inline"` VersionMeta `json:"metadata"` Spec VersionSpec `json:"spec"` Status Status `json:"status"` }
Version section
type VersionMeta ¶
type VersionMeta struct { ClientProtocol string `json:"client_protocol"` ClientName string `json:"client_name"` ClientVersion string `json:"client_version"` }
func (*VersionMeta) GetName ¶
func (m *VersionMeta) GetName() string
type VersionSpec ¶
type VirtualFunction ¶
type VirtualFunction struct {
Name string `json:"name"`
}
type VirtualIP ¶
type VirtualIP struct { TypeMeta `json:",inline"` VirtualIPMeta `json:"metadata"` Spec VirtualIPSpec `json:"spec"` Status Status `json:"status"` }
VirtualIP section
func ProtoVirtualIPToVirtualIP ¶
func ProtoVirtualIPToVirtualIP(interfaceID string, dpdkVIP *proto.GetVipResponse) (*VirtualIP, error)
type VirtualIPMeta ¶
type VirtualIPMeta struct {
InterfaceID string `json:"interface_id"`
}
type VirtualIPSpec ¶
type Vni ¶
type Vni struct { TypeMeta `json:",inline"` VniMeta `json:"metadata"` Spec VniSpec `json:"spec"` Status Status `json:"status"` }
VNI section
Click to show internal directories.
Click to hide internal directories.