Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterToProxy(ctx context.Context, ps PersistenceService, nodeID string)
- type App
- type AuthCreds
- type AuthorityService
- type Controller
- type Credentials
- type DNSARecord
- type DNSConfig
- type DNSConfigAppAlias
- func (*DNSConfigAppAlias) FilterFields() []string
- func (cfg_alias *DNSConfigAppAlias) GetID() string
- func (*DNSConfigAppAlias) GetTableName() string
- func (cfg_alias *DNSConfigAppAlias) SetID(id string)
- func (cfg_alias *DNSConfigAppAlias) String() string
- func (cfg_alias *DNSConfigAppAlias) Validate() error
- type DNSForwarder
- type EPAFeature
- type EgressRule
- type Filter
- type Filterable
- type GTPFilter
- type IPBlock
- type IPFilter
- type IPModifier
- type IngressRule
- type LifecycleStatus
- type MACFilter
- type MACModifier
- type NetworkInterface
- type NetworkInterfaceTrafficPolicy
- type Node
- type NodeApp
- type NodeAppReq
- type NodeAppResp
- type NodeAppTrafficPolicy
- func (*NodeAppTrafficPolicy) FilterFields() []string
- func (n_a_tp *NodeAppTrafficPolicy) GetID() string
- func (*NodeAppTrafficPolicy) GetTableName() string
- func (n_a_tp *NodeAppTrafficPolicy) SetID(id string)
- func (n_a_tp *NodeAppTrafficPolicy) String() string
- func (n_a_tp *NodeAppTrafficPolicy) Validate() error
- type NodeDNSConfig
- func (*NodeDNSConfig) FilterFields() []string
- func (n_cfg *NodeDNSConfig) GetID() string
- func (n_cfg *NodeDNSConfig) GetNodeID() string
- func (*NodeDNSConfig) GetTableName() string
- func (n_cfg *NodeDNSConfig) SetID(id string)
- func (n_cfg *NodeDNSConfig) String() string
- func (n_cfg *NodeDNSConfig) Validate() error
- type NodeEntity
- type NodeGRPCTarget
- type NodeInterface
- func (*NodeInterface) FilterFields() []string
- func (n_i *NodeInterface) GetID() string
- func (n_i *NodeInterface) GetNodeID() string
- func (*NodeInterface) GetTableName() string
- func (n_i *NodeInterface) SetID(id string)
- func (n_i *NodeInterface) String() string
- func (n_i *NodeInterface) Validate() error
- type NodeInterfaceReq
- type NodeInterfaceResp
- type NodeInterfaceTrafficPolicy
- func (*NodeInterfaceTrafficPolicy) FilterFields() []string
- func (n_i_tp *NodeInterfaceTrafficPolicy) GetID() string
- func (*NodeInterfaceTrafficPolicy) GetTableName() string
- func (n_i_tp *NodeInterfaceTrafficPolicy) SetID(id string)
- func (n_i_tp *NodeInterfaceTrafficPolicy) String() string
- func (n_i_tp *NodeInterfaceTrafficPolicy) Validate() error
- type NodeReq
- type NodeResp
- type OrchestrationMode
- type Persistable
- type PersistenceService
- type Port
- type PortProto
- type ReqEntity
- type RespEntity
- type TrafficPolicy
- type TrafficPolicyKubeOVN
- func (*TrafficPolicyKubeOVN) FilterFields() []string
- func (tp *TrafficPolicyKubeOVN) GetID() string
- func (*TrafficPolicyKubeOVN) GetTableName() string
- func (tp *TrafficPolicyKubeOVN) SetID(id string)
- func (tp *TrafficPolicyKubeOVN) String() string
- func (tp *TrafficPolicyKubeOVN) ToK8s() *networkingV1.NetworkPolicy
- func (tp *TrafficPolicyKubeOVN) Validate() error
- type TrafficRule
- type TrafficSelector
- type TrafficTarget
- type Validatable
Constants ¶
const MaxBodySize = 64 * 1024
MaxBodySize is the maximum size (in bytes) of an acceptable request body
const MaxCores = 8
MaxCores is the maximum number of cores that an application can use.
const MaxDBRequestTime = 10 * time.Second
MaxDBRequestTime is the maximum time to request database data before timing out
const MaxHTTPRequestTime = 2 * time.Minute
MaxHTTPRequestTime is the maximum time to request HTTP data before timing out
const MaxMemory = 16 * 1024
MaxMemory is the maximum memory (in MB) that an application can use.
const MaxPort = 65535
MaxPort is the maximum port allowed in the TCP/IP stack
Variables ¶
var PrefaceLis *progutil.PrefaceListener
PrefaceLis Our network callback helper
Functions ¶
func RegisterToProxy ¶
func RegisterToProxy(ctx context.Context, ps PersistenceService, nodeID string)
Inform the proxy we're serving this host
Types ¶
type App ¶
type App struct {
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Version string `json:"version"`
Vendor string `json:"vendor"`
Description string `json:"description"`
Cores int `json:"cores"`
Memory int `json:"memory"` // in MB
Ports []PortProto `json:"ports,omitempty"`
Source string `json:"source"`
EPAFeatures []EPAFeature `json:"epafeatures,omitempty"`
}
App is an application.
func (*App) EPAValidate ¶
EPAValidate returns error if provided nodeFeatures do not fulfill app.EPAFeatures
func (*App) FilterFields ¶
FilterFields returns the filterable fields for this model.
func (*App) GetTableName ¶
GetTableName returns the name of the persistence table.
type AuthorityService ¶
type AuthorityService interface {
// CAChain returns the certificate authority chain, starting with the
// issuing CA and ending with the root CA (inclusive).
CAChain() ([]*x509.Certificate, error)
// SignCSR signs a ASN.1 DER encoded certificate signing request.
SignCSR(der []byte, template *x509.Certificate) (*x509.Certificate, error)
}
AuthorityService manages digital certificates.
type Controller ¶
type Controller struct {
OrchestrationMode OrchestrationMode
// must not be nil if
// OrchestrationModeKubernetes or OrchestrationModeKubernetesOVN
KubernetesClient *k8s.Client
PersistenceService PersistenceService
AuthorityService AuthorityService
TokenService *jose.JWSTokenIssuer
AdminCreds *AuthCreds
// The edge node's port that it listens on for gRPC connections from the
// Controller and serves Mm5-related endpoints for application and network
// policy configuration.
//
// If ELAPort is empty the default of 42101 is used.
ELAPort string
// The edge node's port that it listens on for gRPC connections from the
// Controller and serves Mm6-related endpoints for app deployment and
// lifecycle commands.
//
// If EVAPort is empty the default of 42102 is used.
EVAPort string
// EdgeNodeCreds are the transport credentials for connecting to an edge
// node. The server name will be overridden.
EdgeNodeCreds *tls.Config
}
Controller aggregates controller services.
type Credentials ¶
type Credentials struct {
// ID is the base64-encoded MD5 hash of the certificate's public key.
ID string `json:"id"`
// Certificate is a PEM-encoded X.509 certificate.
Certificate string `json:"certificate"`
}
Credentials defines a response for a request to obtain authentication credentials. These credentials may be used to further communicate with endpoint(s) that are protected by a form of authentication.
func (*Credentials) GetTableName ¶
func (c *Credentials) GetTableName() string
GetTableName returns the name of the table this entity is saved in.
func (*Credentials) String ¶
func (c *Credentials) String() string
type DNSARecord ¶
type DNSARecord struct {
Name string `json:"name"`
Description string `json:"description"`
IPs []string `json:"ips"`
}
DNSARecord is a DNS A record.
func (*DNSARecord) String ¶
func (r *DNSARecord) String() string
type DNSConfig ¶
type DNSConfig struct {
ID string `json:"id"`
Name string `json:"name"`
ARecords []*DNSARecord `json:"a_records"`
Forwarders []*DNSForwarder `json:"forwarders"`
}
DNSConfig is a DNS configuration.
func (*DNSConfig) FilterFields ¶
FilterFields returns the filterable fields for this model.
func (*DNSConfig) GetTableName ¶
GetTableName returns the name of the persistence table.
type DNSConfigAppAlias ¶
type DNSConfigAppAlias struct {
ID string `json:"id"`
DNSConfigID string `json:"dns_config_id"`
Name string `json:"name"`
Description string `json:"description"`
AppID string `json:"app_id"`
}
DNSConfigAppAlias represents an association between a DNSConfig and an AppID.
func (*DNSConfigAppAlias) FilterFields ¶
func (*DNSConfigAppAlias) FilterFields() []string
FilterFields returns the filterable fields for this model.
func (*DNSConfigAppAlias) GetID ¶
func (cfg_alias *DNSConfigAppAlias) GetID() string
GetID gets the ID.
func (*DNSConfigAppAlias) GetTableName ¶
func (*DNSConfigAppAlias) GetTableName() string
GetTableName returns the name of the persistence table.
func (*DNSConfigAppAlias) SetID ¶
func (cfg_alias *DNSConfigAppAlias) SetID(id string)
SetID sets the ID.
func (*DNSConfigAppAlias) String ¶
func (cfg_alias *DNSConfigAppAlias) String() string
func (*DNSConfigAppAlias) Validate ¶
func (cfg_alias *DNSConfigAppAlias) Validate() error
Validate validates the model.
type DNSForwarder ¶
type DNSForwarder struct {
Name string `json:"name"`
Description string `json:"description"`
IP string `json:"ip"`
}
DNSForwarder is a DNS forwarder.
func (*DNSForwarder) String ¶
func (f *DNSForwarder) String() string
func (*DNSForwarder) Validate ¶
func (f *DNSForwarder) Validate() error
Validate validates the model.
type EPAFeature ¶
EPAFeature is a key-value pair used to represent Enhanced Platform Awareness feature settings
type EgressRule ¶
type EgressRule struct {
Description string `json:"description"`
To []*IPBlock `json:"to"`
Ports []*Port `json:"ports"`
}
EgressRule is the model for a egress rule.
func (*EgressRule) String ¶
func (er *EgressRule) String() string
func (*EgressRule) ToK8s ¶
func (er *EgressRule) ToK8s() networkingV1.NetworkPolicyEgressRule
ToK8s converts egress rule into Kubernetes' egress rule
type Filterable ¶
type Filterable interface {
Persistable
FilterFields() []string
}
Filterable is a Persistable that can be filtered.
type GTPFilter ¶
type GTPFilter struct {
Address string `json:"address"`
Mask int `json:"mask"`
IMSIs []string `json:"imsis"`
}
GTPFilter is the model for a GTP filter.
type IPBlock ¶
IPBlock is the model for a ip block.
func (*IPBlock) ToK8s ¶
func (ipb *IPBlock) ToK8s() networkingV1.NetworkPolicyPeer
ToK8s converts IPBlock into Kubernetes' Peer
type IPFilter ¶
type IPFilter struct {
Address string `json:"address"`
Mask int `json:"mask"`
BeginPort int `json:"begin_port"`
EndPort int `json:"end_port"`
Protocol string `json:"protocol"`
}
IPFilter is the model for an IP filter.
type IPModifier ¶
IPModifier is the model for an IP modifier.
func (*IPModifier) String ¶
func (m *IPModifier) String() string
type IngressRule ¶
type IngressRule struct {
Description string `json:"description"`
From []*IPBlock `json:"from"`
Ports []*Port `json:"ports"`
}
IngressRule is the model for a ingress rule.
func (*IngressRule) String ¶
func (ir *IngressRule) String() string
func (*IngressRule) ToK8s ¶
func (ir *IngressRule) ToK8s() networkingV1.NetworkPolicyIngressRule
ToK8s converts ingress rule into Kubernetes' ingress rule
func (*IngressRule) Validate ¶
func (ir *IngressRule) Validate() error
Validate validates the model.
type LifecycleStatus ¶
type LifecycleStatus int
LifecycleStatus is an application's status.
const ( // Unknown is an unknown lifecycle status Unknown LifecycleStatus = iota // Deploying is deploying to a node Deploying // Deployed is deployed to a node Deployed // Starting is starting Starting // Running is running Running // Stopping is stopping Stopping // Stopped is stopped Stopped // Error is an error status Error )
func (LifecycleStatus) String ¶
func (s LifecycleStatus) String() string
type MACFilter ¶
type MACFilter struct {
MACAddresses []string `json:"mac_addresses"`
}
MACFilter is the model for a MAC filter.
type MACModifier ¶
type MACModifier struct {
MACAddress string `json:"mac_address"`
}
MACModifier is the model for a MAC modifier.
func (*MACModifier) String ¶
func (m *MACModifier) String() string
type NetworkInterface ¶
type NetworkInterface struct {
ID string `json:"id"`
Description string `json:"description"`
Driver string `json:"driver"`
Type string `json:"type"`
MACAddress string `json:"mac_address"`
VLAN int `json:"vlan"`
Zones []string `json:"zones"`
FallbackInterface string `json:"fallback_interface"`
}
NetworkInterface is a NetworkInterface. TODO add a String() method for this struct.
type NetworkInterfaceTrafficPolicy ¶
type NetworkInterfaceTrafficPolicy struct {
NetworkInterfaceID string `json:"network_interface_id"`
TrafficPolicyID string `json:"traffic_policy_id"`
}
NetworkInterfaceTrafficPolicy specifies the traffic policy for a network interface.
type Node ¶
type Node struct {
ID string `json:"id"`
Name string `json:"name"`
Location string `json:"location"`
Serial string `json:"serial"`
}
Node is a node (aka appliance or device).
func (*Node) FilterFields ¶
FilterFields returns the filterable fields for this model.
func (*Node) GetTableName ¶
GetTableName returns the name of the persistence table.
type NodeApp ¶
type NodeApp struct {
ID string `json:"id"`
NodeID string `json:"node_id"`
AppID string `json:"app_id"`
}
NodeApp represents an association between a Node and an App.
func (*NodeApp) FilterFields ¶
FilterFields returns the filterable fields for this model.
func (*NodeApp) GetTableName ¶
GetTableName returns the name of the persistence table.
type NodeAppReq ¶
NodeAppReq is a NodeApp request. TODO add a String() method and test for this struct.
func (*NodeAppReq) GetTableName ¶
func (n_ar *NodeAppReq) GetTableName() string
GetTableName returns the name of the persistence table.
func (*NodeAppReq) Validate ¶
func (n_ar *NodeAppReq) Validate() error
Validate validates the request model. TODO add a test for this method.
type NodeAppResp ¶
NodeAppResp is a NodeApp response. TODO add a String() method and test for this struct.
type NodeAppTrafficPolicy ¶
type NodeAppTrafficPolicy struct {
ID string `json:"id"`
NodeAppID string `json:"nodes_apps_id"`
TrafficPolicyID string `json:"traffic_policy_id"`
}
NodeAppTrafficPolicy represents an association between a NodeApp and a TrafficPolicy.
func (*NodeAppTrafficPolicy) FilterFields ¶
func (*NodeAppTrafficPolicy) FilterFields() []string
FilterFields returns the filterable fields for this model.
func (*NodeAppTrafficPolicy) GetID ¶
func (n_a_tp *NodeAppTrafficPolicy) GetID() string
GetID gets the ID.
func (*NodeAppTrafficPolicy) GetTableName ¶
func (*NodeAppTrafficPolicy) GetTableName() string
GetTableName returns the name of the persistence table.
func (*NodeAppTrafficPolicy) SetID ¶
func (n_a_tp *NodeAppTrafficPolicy) SetID(id string)
SetID sets the ID.
func (*NodeAppTrafficPolicy) String ¶
func (n_a_tp *NodeAppTrafficPolicy) String() string
func (*NodeAppTrafficPolicy) Validate ¶
func (n_a_tp *NodeAppTrafficPolicy) Validate() error
Validate validates the model.
type NodeDNSConfig ¶
type NodeDNSConfig struct {
ID string `json:"id"`
NodeID string `json:"node_id"`
DNSConfigID string `json:"dns_config_id"`
}
NodeDNSConfig represents an association between a Node and a DNSConfig.
func (*NodeDNSConfig) FilterFields ¶
func (*NodeDNSConfig) FilterFields() []string
FilterFields returns the filterable fields for this model.
func (*NodeDNSConfig) GetNodeID ¶
func (n_cfg *NodeDNSConfig) GetNodeID() string
GetNodeID gets the node ID.
func (*NodeDNSConfig) GetTableName ¶
func (*NodeDNSConfig) GetTableName() string
GetTableName returns the name of the persistence table.
func (*NodeDNSConfig) String ¶
func (n_cfg *NodeDNSConfig) String() string
func (*NodeDNSConfig) Validate ¶
func (n_cfg *NodeDNSConfig) Validate() error
Validate validates the model.
type NodeGRPCTarget ¶
type NodeGRPCTarget struct {
ID string `json:"id"`
NodeID string `json:"node_id"`
GRPCTarget string `json:"grpc_target"`
}
NodeGRPCTarget is a node's GRPC target.
func (*NodeGRPCTarget) FilterFields ¶
func (t *NodeGRPCTarget) FilterFields() []string
FilterFields returns the filterable fields for this model.
func (*NodeGRPCTarget) GetNodeID ¶
func (t *NodeGRPCTarget) GetNodeID() string
GetNodeID gets the node ID.
func (*NodeGRPCTarget) GetTableName ¶
func (*NodeGRPCTarget) GetTableName() string
GetTableName returns the name of the persistence table.
func (*NodeGRPCTarget) String ¶
func (t *NodeGRPCTarget) String() string
type NodeInterface ¶
type NodeInterface struct {
ID string `json:"id"`
NodeID string `json:"node_id"`
InterfaceID string `json:"interface_id"`
}
NodeInterface represents an association between a Node and an Interface.
func (*NodeInterface) FilterFields ¶
func (*NodeInterface) FilterFields() []string
FilterFields returns the filterable fields for this model.
func (*NodeInterface) GetNodeID ¶
func (n_i *NodeInterface) GetNodeID() string
GetNodeID gets the node ID.
func (*NodeInterface) GetTableName ¶
func (*NodeInterface) GetTableName() string
GetTableName returns the name of the persistence table.
func (*NodeInterface) String ¶
func (n_i *NodeInterface) String() string
func (*NodeInterface) Validate ¶
func (n_i *NodeInterface) Validate() error
Validate validates the model.
type NodeInterfaceReq ¶
type NodeInterfaceReq struct {
NodeInterface
Cmd string `json:"cmd,omitempty"`
}
NodeInterfaceReq is a NodeInterface request. TODO add a String() method and test for this struct.
func (*NodeInterfaceReq) GetTableName ¶
func (n_ir *NodeInterfaceReq) GetTableName() string
GetTableName returns the name of the persistence table.
func (*NodeInterfaceReq) Validate ¶
func (n_ir *NodeInterfaceReq) Validate() error
Validate validates the request model. TODO add a test for this method.
type NodeInterfaceResp ¶
type NodeInterfaceResp struct {
NodeInterface
Status string `json:"status"`
}
NodeInterfaceResp is a NodeInterface response. TODO add a String() method and test for this struct.
type NodeInterfaceTrafficPolicy ¶
type NodeInterfaceTrafficPolicy struct {
ID string `json:"id"`
NodeID string `json:"node_id"`
NetworkInterfaceID string `json:"network_interface_id"`
TrafficPolicyID string `json:"traffic_policy_id"`
}
NodeInterfaceTrafficPolicy represents an association between a NodeInterface and a TrafficPolicy.
func (*NodeInterfaceTrafficPolicy) FilterFields ¶
func (*NodeInterfaceTrafficPolicy) FilterFields() []string
FilterFields returns the filterable fields for this model.
func (*NodeInterfaceTrafficPolicy) GetID ¶
func (n_i_tp *NodeInterfaceTrafficPolicy) GetID() string
GetID gets the ID.
func (*NodeInterfaceTrafficPolicy) GetTableName ¶
func (*NodeInterfaceTrafficPolicy) GetTableName() string
GetTableName returns the name of the persistence table.
func (*NodeInterfaceTrafficPolicy) SetID ¶
func (n_i_tp *NodeInterfaceTrafficPolicy) SetID(id string)
SetID sets the ID.
func (*NodeInterfaceTrafficPolicy) String ¶
func (n_i_tp *NodeInterfaceTrafficPolicy) String() string
func (*NodeInterfaceTrafficPolicy) Validate ¶
func (n_i_tp *NodeInterfaceTrafficPolicy) Validate() error
Validate validates the model.
type NodeReq ¶
type NodeReq struct {
Node
NetworkInterfaces []*NetworkInterface `json:"network_interfaces"`
TrafficPolicies []NetworkInterfaceTrafficPolicy `json:"traffic_policies"`
}
NodeReq is a Node request.
func (*NodeReq) GetTableName ¶
GetTableName returns the name of the persistence table.
type NodeResp ¶
type NodeResp struct {
Node
NetworkInterfaces []*NetworkInterface `json:"network_interfaces"`
}
NodeResp is a Node response. TODO add a String() method and test for this struct.
type OrchestrationMode ¶
type OrchestrationMode int
OrchestrationMode global level orchestration mode for application deployment
const ( // OrchestrationModeNative uses Docker on the node to control application // container instances OrchestrationModeNative OrchestrationMode = iota // OrchestrationModeKubernetes uses an external Kubernetes master to // control application container instances on nodes OrchestrationModeKubernetes // OrchestrationModeKubernetesOVN uses an external Kubernetes master to // control application container instances on nodes. NTS functionality is // replaced with OVN/OVS. Traffic Policies are replaced with Kubernetes // Network Policies. OrchestrationModeKubernetesOVN )
type Persistable ¶
Persistable can be persisted.
type PersistenceService ¶
type PersistenceService interface {
Create(ctx context.Context, e Persistable) error
Read(ctx context.Context, id string, zv Persistable) (e Persistable, err error)
ReadAll(ctx context.Context, zv Persistable) (ps []Persistable, err error)
Filter(ctx context.Context, zv Filterable, fs []Filter) (ps []Persistable, err error)
BulkUpdate(ctx context.Context, ps []Persistable) error
Delete(ctx context.Context, id string, zv Persistable) (ok bool, err error)
}
PersistenceService manages entity persistence. The methods with zv parameters take a zero-value Persistable for reflectively creating new instances of the concrete type. In the case of Delete it is used to get the table name.
type Port ¶
Port is the model for a port.
func (*Port) ToK8s ¶
func (p *Port) ToK8s() networkingV1.NetworkPolicyPort
ToK8s converts port into Kubernetes' port
type PortProto ¶
type PortProto struct {
Port uint32 `json:"port,omitempty"`
Protocol string `json:"protocol,omitempty"`
}
PortProto is a port and protocol combination. It is typically used to represent the ports and protocols that an application is listening on and needs exposed.
type TrafficPolicy ¶
type TrafficPolicy struct {
ID string `json:"id"`
Name string `json:"name"`
Rules []*TrafficRule `json:"traffic_rules"`
}
TrafficPolicy is an application or interface traffic policy.
func (*TrafficPolicy) FilterFields ¶
func (*TrafficPolicy) FilterFields() []string
FilterFields returns the filterable fields for this model.
func (*TrafficPolicy) GetTableName ¶
func (*TrafficPolicy) GetTableName() string
GetTableName returns the name of the persistence table.
func (*TrafficPolicy) String ¶
func (tp *TrafficPolicy) String() string
func (*TrafficPolicy) Validate ¶
func (tp *TrafficPolicy) Validate() error
Validate validates the model.
type TrafficPolicyKubeOVN ¶
type TrafficPolicyKubeOVN struct {
ID string `json:"id"`
Name string `json:"name"`
Ingress []*IngressRule `json:"ingress_rules"`
Egress []*EgressRule `json:"egress_rules"`
}
TrafficPolicyKubeOVN is an application or interface traffic policy.
func (*TrafficPolicyKubeOVN) FilterFields ¶
func (*TrafficPolicyKubeOVN) FilterFields() []string
FilterFields returns the filterable fields for this model.
func (*TrafficPolicyKubeOVN) GetID ¶
func (tp *TrafficPolicyKubeOVN) GetID() string
GetID gets the ID.
func (*TrafficPolicyKubeOVN) GetTableName ¶
func (*TrafficPolicyKubeOVN) GetTableName() string
GetTableName returns the name of the persistence table.
func (*TrafficPolicyKubeOVN) SetID ¶
func (tp *TrafficPolicyKubeOVN) SetID(id string)
SetID sets the ID.
func (*TrafficPolicyKubeOVN) String ¶
func (tp *TrafficPolicyKubeOVN) String() string
func (*TrafficPolicyKubeOVN) ToK8s ¶
func (tp *TrafficPolicyKubeOVN) ToK8s() *networkingV1.NetworkPolicy
ToK8s converts traffic policy into Kubernetes' NetworkPolicy
func (*TrafficPolicyKubeOVN) Validate ¶
func (tp *TrafficPolicyKubeOVN) Validate() error
Validate validates the model.
type TrafficRule ¶
type TrafficRule struct {
Description string `json:"description"`
Priority int `json:"priority"`
Source *TrafficSelector `json:"source"`
Destination *TrafficSelector `json:"destination"`
Target *TrafficTarget `json:"target"`
}
TrafficRule is the model for a traffic rule.
func (*TrafficRule) String ¶
func (tr *TrafficRule) String() string
func (*TrafficRule) Validate ¶
func (tr *TrafficRule) Validate() error
Validate validates the model.
type TrafficSelector ¶
type TrafficSelector struct {
Description string `json:"description"`
MACs *MACFilter `json:"mac_filter"`
IP *IPFilter `json:"ip_filter"`
GTP *GTPFilter `json:"gtp_filter"`
}
TrafficSelector is the model for a traffic selector.
func (*TrafficSelector) String ¶
func (ts *TrafficSelector) String() string
func (*TrafficSelector) Validate ¶
func (ts *TrafficSelector) Validate() error
Validate validates the model.
type TrafficTarget ¶
type TrafficTarget struct {
Description string `json:"description"`
Action string `json:"action"`
MAC *MACModifier `json:"mac_modifier"`
IP *IPModifier `json:"ip_modifier"`
}
TrafficTarget is the model for a traffic target.
func (*TrafficTarget) String ¶
func (tt *TrafficTarget) String() string
func (*TrafficTarget) Validate ¶
func (tt *TrafficTarget) Validate() error
Validate validates the model.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
cce
command
|
|
|
edgednscli
command
|
|
|
interfaceservicecli
command
|
|
|
nfd-master
command
|
|
|
internal
|
|
|
mock
|
|
|
test
|
|
|
node/grpc
command
|
|