model

package
v3.3.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const Keyword = "servicefunctionchain"

Keyword defines the keyword identifying ServiceFunctionChain data.

Variables

View Source
var ServiceFunctionChain_ServiceFunction_Type_name = map[int32]string{
	0: "Pod",
	1: "ExternalInterface",
}
View Source
var ServiceFunctionChain_ServiceFunction_Type_value = map[string]int32{
	"Pod":               0,
	"ExternalInterface": 1,
}

Functions

func Key

func Key(chain string) string

Key returns the key for configuration of a given service function chain.

func KeyPrefix

func KeyPrefix() string

KeyPrefix return prefix where all service function chain configs are persisted.

Types

type ServiceFunctionChain

type ServiceFunctionChain struct {
	// Name of the chain.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// true if the service chain should be unidirectional (the traffic should pass in one way only).
	// Otherwise the chains is bidirectional (the traffic can pass both ways).
	Unidirectional bool `protobuf:"varint,2,opt,name=unidirectional,proto3" json:"unidirectional,omitempty"`
	// Name of the custom pod network where the chain resides
	// (if applicable, can be left blank for the default pod network).
	Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"`
	// List of service functions (chain elements) in the chain.
	Chain                []*ServiceFunctionChain_ServiceFunction `protobuf:"bytes,4,rep,name=chain,proto3" json:"chain,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                `json:"-"`
	XXX_unrecognized     []byte                                  `json:"-"`
	XXX_sizecache        int32                                   `json:"-"`
}

ServiceFunctionChain is used to store definition of a service function chain as a k8s CRD resource.

func (*ServiceFunctionChain) Descriptor

func (*ServiceFunctionChain) Descriptor() ([]byte, []int)

func (*ServiceFunctionChain) GetChain

func (*ServiceFunctionChain) GetName

func (m *ServiceFunctionChain) GetName() string

func (*ServiceFunctionChain) GetNetwork

func (m *ServiceFunctionChain) GetNetwork() string

func (*ServiceFunctionChain) GetUnidirectional

func (m *ServiceFunctionChain) GetUnidirectional() bool

func (*ServiceFunctionChain) ProtoMessage

func (*ServiceFunctionChain) ProtoMessage()

func (*ServiceFunctionChain) Reset

func (m *ServiceFunctionChain) Reset()

func (*ServiceFunctionChain) String

func (m *ServiceFunctionChain) String() string

func (*ServiceFunctionChain) XXX_DiscardUnknown

func (m *ServiceFunctionChain) XXX_DiscardUnknown()

func (*ServiceFunctionChain) XXX_Marshal

func (m *ServiceFunctionChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceFunctionChain) XXX_Merge

func (m *ServiceFunctionChain) XXX_Merge(src proto.Message)

func (*ServiceFunctionChain) XXX_Size

func (m *ServiceFunctionChain) XXX_Size() int

func (*ServiceFunctionChain) XXX_Unmarshal

func (m *ServiceFunctionChain) XXX_Unmarshal(b []byte) error

type ServiceFunctionChain_ServiceFunction

type ServiceFunctionChain_ServiceFunction struct {
	// Name of the service function (optional).
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Type of the service function.
	Type ServiceFunctionChain_ServiceFunction_Type `protobuf:"varint,2,opt,name=type,proto3,enum=model.ServiceFunctionChain_ServiceFunction_Type" json:"type,omitempty"`
	// Pod selector (k8s labels) identifying the pod(s)
	// (applicable for pod service function type).
	PodSelector map[string]string `` /* 182-byte string literal not displayed */
	// Interface trough which the traffic enters or leaves the pod / external interface. Applicable for:
	// - pods that use only a single interface for SFC (first/last pod in the chain
	//   or pods using the same interface for SFC input and output).
	// - external interfaces
	Interface string `protobuf:"bytes,6,opt,name=interface,proto3" json:"interface,omitempty"`
	// Interface trough which the traffic enters the service function. Applicable for:
	// - pods using different interfaces for SFC input and output
	InputInterface string `protobuf:"bytes,4,opt,name=input_interface,json=inputInterface,proto3" json:"input_interface,omitempty"`
	// Interface trough which the traffic leaves the service function. Applicable for:
	// - pods using different interfaces for SFC input and output
	OutputInterface      string   `protobuf:"bytes,5,opt,name=output_interface,json=outputInterface,proto3" json:"output_interface,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServiceFunctionChain_ServiceFunction) Descriptor

func (*ServiceFunctionChain_ServiceFunction) Descriptor() ([]byte, []int)

func (*ServiceFunctionChain_ServiceFunction) GetInputInterface

func (m *ServiceFunctionChain_ServiceFunction) GetInputInterface() string

func (*ServiceFunctionChain_ServiceFunction) GetInterface

func (m *ServiceFunctionChain_ServiceFunction) GetInterface() string

func (*ServiceFunctionChain_ServiceFunction) GetName

func (*ServiceFunctionChain_ServiceFunction) GetOutputInterface

func (m *ServiceFunctionChain_ServiceFunction) GetOutputInterface() string

func (*ServiceFunctionChain_ServiceFunction) GetPodSelector

func (m *ServiceFunctionChain_ServiceFunction) GetPodSelector() map[string]string

func (*ServiceFunctionChain_ServiceFunction) GetType

func (*ServiceFunctionChain_ServiceFunction) ProtoMessage

func (*ServiceFunctionChain_ServiceFunction) ProtoMessage()

func (*ServiceFunctionChain_ServiceFunction) Reset

func (*ServiceFunctionChain_ServiceFunction) String

func (*ServiceFunctionChain_ServiceFunction) XXX_DiscardUnknown

func (m *ServiceFunctionChain_ServiceFunction) XXX_DiscardUnknown()

func (*ServiceFunctionChain_ServiceFunction) XXX_Marshal

func (m *ServiceFunctionChain_ServiceFunction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceFunctionChain_ServiceFunction) XXX_Merge

func (*ServiceFunctionChain_ServiceFunction) XXX_Size

func (*ServiceFunctionChain_ServiceFunction) XXX_Unmarshal

func (m *ServiceFunctionChain_ServiceFunction) XXX_Unmarshal(b []byte) error

type ServiceFunctionChain_ServiceFunction_Type

type ServiceFunctionChain_ServiceFunction_Type int32
const (
	ServiceFunctionChain_ServiceFunction_Pod               ServiceFunctionChain_ServiceFunction_Type = 0
	ServiceFunctionChain_ServiceFunction_ExternalInterface ServiceFunctionChain_ServiceFunction_Type = 1
)

func (ServiceFunctionChain_ServiceFunction_Type) EnumDescriptor

func (ServiceFunctionChain_ServiceFunction_Type) EnumDescriptor() ([]byte, []int)

func (ServiceFunctionChain_ServiceFunction_Type) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL