cnfreg

package
v0.0.0-...-ae01f8c Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CnfMode_name = map[int32]string{
		0: "STANDALONE",
		1: "STONEWORK_MODULE",
		2: "STONEWORK",
	}
	CnfMode_value = map[string]int32{
		"STANDALONE":       0,
		"STONEWORK_MODULE": 1,
		"STONEWORK":        2,
	}
)

Enum value maps for CnfMode.

View Source
var CnfDiscovery_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cnfreg.CnfDiscovery",
	HandlerType: (*CnfDiscoveryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DiscoverCnf",
			Handler:    _CnfDiscovery_DiscoverCnf_Handler,
		},
		{
			MethodName: "GetPuntRequests",
			Handler:    _CnfDiscovery_GetPuntRequests_Handler,
		},
		{
			MethodName: "GetItemDependencies",
			Handler:    _CnfDiscovery_GetItemDependencies_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cnfreg/cnfreg.proto",
}

CnfDiscovery_ServiceDesc is the grpc.ServiceDesc for CnfDiscovery service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_cnfreg_cnfreg_proto protoreflect.FileDescriptor

Functions

func RegisterCnfDiscoveryServer

func RegisterCnfDiscoveryServer(s grpc.ServiceRegistrar, srv CnfDiscoveryServer)

Types

type CnfDiscoveryClient

type CnfDiscoveryClient interface {
	// DiscoverCnf is served by the CNFRegistry of each SW-Module CNF.
	// It is called by StoneWork during Init of CNFRegistry.
	DiscoverCnf(ctx context.Context, in *DiscoverCnfReq, opts ...grpc.CallOption) (*DiscoverCnfResp, error)
	// GetPuntRequests is served by CNFRegistry of a SW-Module CNF and returns the set of packet punt
	// requests corresponding to the given configuration item.
	GetPuntRequests(ctx context.Context, in *generic.Item, opts ...grpc.CallOption) (*puntmgr.PuntRequests, error)
	// GetItemDependencies is served by CNFRegistry of a SW-Module CNF and returns
	// the set of dependencies of the given configuration item (apart from punt deps which are determined
	// from punt requests).
	GetItemDependencies(ctx context.Context, in *generic.Item, opts ...grpc.CallOption) (*GetDependenciesResp, error)
}

CnfDiscoveryClient is the client API for CnfDiscovery service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CnfDiscoveryServer

type CnfDiscoveryServer interface {
	// DiscoverCnf is served by the CNFRegistry of each SW-Module CNF.
	// It is called by StoneWork during Init of CNFRegistry.
	DiscoverCnf(context.Context, *DiscoverCnfReq) (*DiscoverCnfResp, error)
	// GetPuntRequests is served by CNFRegistry of a SW-Module CNF and returns the set of packet punt
	// requests corresponding to the given configuration item.
	GetPuntRequests(context.Context, *generic.Item) (*puntmgr.PuntRequests, error)
	// GetItemDependencies is served by CNFRegistry of a SW-Module CNF and returns
	// the set of dependencies of the given configuration item (apart from punt deps which are determined
	// from punt requests).
	GetItemDependencies(context.Context, *generic.Item) (*GetDependenciesResp, error)
	// contains filtered or unexported methods
}

CnfDiscoveryServer is the server API for CnfDiscovery service. All implementations must embed UnimplementedCnfDiscoveryServer for forward compatibility

type CnfMode

type CnfMode int32

Mode in which the CNF operates wrt. the other CNFs.

const (
	// CNF runs both data-plane (typically VPP) and control-plane inside its container
	// and with other CNFs is integrated through CNF chaining (i.e. packets are copied between CNFs).
	CnfMode_STANDALONE CnfMode = 0
	// CNF runs as a module for StoneWork (All-in-one VPP). It means that it does not run data-plane inside
	// its container, but instead is integrated with the single shared VPP and potentially also shares
	// the same Linux network namespace with some other CNFs.
	CnfMode_STONEWORK_MODULE CnfMode = 1
	// Mode in which the agent of StoneWork operates.
	CnfMode_STONEWORK CnfMode = 2
)

func (CnfMode) Descriptor

func (CnfMode) Descriptor() protoreflect.EnumDescriptor

func (CnfMode) Enum

func (x CnfMode) Enum() *CnfMode

func (CnfMode) EnumDescriptor deprecated

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

Deprecated: Use CnfMode.Descriptor instead.

func (CnfMode) Number

func (x CnfMode) Number() protoreflect.EnumNumber

func (CnfMode) String

func (x CnfMode) String() string

func (CnfMode) Type

func (CnfMode) Type() protoreflect.EnumType

type ConfigItemDependency

type ConfigItemDependency struct {
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// Types that are assignable to Dep:
	//
	//	*ConfigItemDependency_Key_
	//	*ConfigItemDependency_Anyof
	Dep isConfigItemDependency_Dep `protobuf_oneof:"dep"`
	// contains filtered or unexported fields
}

ConfigItemDependency stores information about a single dependency of a configuration item.

func (*ConfigItemDependency) Descriptor deprecated

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

Deprecated: Use ConfigItemDependency.ProtoReflect.Descriptor instead.

func (*ConfigItemDependency) GetAnyof

func (*ConfigItemDependency) GetDep

func (m *ConfigItemDependency) GetDep() isConfigItemDependency_Dep

func (*ConfigItemDependency) GetKey

func (x *ConfigItemDependency) GetKey() string

func (*ConfigItemDependency) GetLabel

func (x *ConfigItemDependency) GetLabel() string

func (*ConfigItemDependency) ProtoMessage

func (*ConfigItemDependency) ProtoMessage()

func (*ConfigItemDependency) ProtoReflect

func (x *ConfigItemDependency) ProtoReflect() protoreflect.Message

func (*ConfigItemDependency) Reset

func (x *ConfigItemDependency) Reset()

func (*ConfigItemDependency) String

func (x *ConfigItemDependency) String() string

type ConfigItemDependency_AnyOf

type ConfigItemDependency_AnyOf struct {
	KeyPrefixes []string `protobuf:"bytes,1,rep,name=key_prefixes,json=keyPrefixes,proto3" json:"key_prefixes,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigItemDependency_AnyOf) Descriptor deprecated

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

Deprecated: Use ConfigItemDependency_AnyOf.ProtoReflect.Descriptor instead.

func (*ConfigItemDependency_AnyOf) GetKeyPrefixes

func (x *ConfigItemDependency_AnyOf) GetKeyPrefixes() []string

func (*ConfigItemDependency_AnyOf) ProtoMessage

func (*ConfigItemDependency_AnyOf) ProtoMessage()

func (*ConfigItemDependency_AnyOf) ProtoReflect

func (*ConfigItemDependency_AnyOf) Reset

func (x *ConfigItemDependency_AnyOf) Reset()

func (*ConfigItemDependency_AnyOf) String

func (x *ConfigItemDependency_AnyOf) String() string

type ConfigItemDependency_Anyof

type ConfigItemDependency_Anyof struct {
	Anyof *ConfigItemDependency_AnyOf `protobuf:"bytes,3,opt,name=anyof,proto3,oneof"`
}

type ConfigItemDependency_Key

type ConfigItemDependency_Key struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigItemDependency_Key) Descriptor deprecated

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

Deprecated: Use ConfigItemDependency_Key.ProtoReflect.Descriptor instead.

func (*ConfigItemDependency_Key) GetKey

func (x *ConfigItemDependency_Key) GetKey() string

func (*ConfigItemDependency_Key) ProtoMessage

func (*ConfigItemDependency_Key) ProtoMessage()

func (*ConfigItemDependency_Key) ProtoReflect

func (x *ConfigItemDependency_Key) ProtoReflect() protoreflect.Message

func (*ConfigItemDependency_Key) Reset

func (x *ConfigItemDependency_Key) Reset()

func (*ConfigItemDependency_Key) String

func (x *ConfigItemDependency_Key) String() string

type ConfigItemDependency_Key_

type ConfigItemDependency_Key_ struct {
	Key string `protobuf:"bytes,2,opt,name=key,proto3,oneof"`
}

type DiscoverCnfReq

type DiscoverCnfReq struct {

	// Management IP address of StoneWork.
	SwIpAddress string `protobuf:"bytes,1,opt,name=sw_ip_address,json=swIpAddress,proto3" json:"sw_ip_address,omitempty"`
	// gRPC port on which StoneWork (client of this request) listens.
	SwGrpcPort uint32 `protobuf:"varint,2,opt,name=sw_grpc_port,json=swGrpcPort,proto3" json:"sw_grpc_port,omitempty"`
	// HTTP port on which StoneWork (client of this request) listens.
	SwHttpPort uint32 `protobuf:"varint,3,opt,name=sw_http_port,json=swHttpPort,proto3" json:"sw_http_port,omitempty"`
	// contains filtered or unexported fields
}

DiscoverCnfReq is sent by CNFRegistry of STONEWORK to discover a SW-Module CNF.

func (*DiscoverCnfReq) Descriptor deprecated

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

Deprecated: Use DiscoverCnfReq.ProtoReflect.Descriptor instead.

func (*DiscoverCnfReq) GetSwGrpcPort

func (x *DiscoverCnfReq) GetSwGrpcPort() uint32

func (*DiscoverCnfReq) GetSwHttpPort

func (x *DiscoverCnfReq) GetSwHttpPort() uint32

func (*DiscoverCnfReq) GetSwIpAddress

func (x *DiscoverCnfReq) GetSwIpAddress() string

func (*DiscoverCnfReq) ProtoMessage

func (*DiscoverCnfReq) ProtoMessage()

func (*DiscoverCnfReq) ProtoReflect

func (x *DiscoverCnfReq) ProtoReflect() protoreflect.Message

func (*DiscoverCnfReq) Reset

func (x *DiscoverCnfReq) Reset()

func (*DiscoverCnfReq) String

func (x *DiscoverCnfReq) String() string

type DiscoverCnfResp

type DiscoverCnfResp struct {

	// Microservice label of the discovered CNF.
	CnfMsLabel   string                         `protobuf:"bytes,1,opt,name=cnf_ms_label,json=cnfMsLabel,proto3" json:"cnf_ms_label,omitempty"`
	ConfigModels []*DiscoverCnfResp_ConfigModel `protobuf:"bytes,4,rep,name=config_models,json=configModels,proto3" json:"config_models,omitempty"`
	// contains filtered or unexported fields
}

DiscoverCnfResp is returned by STONEWORK_MODULE with information about CNF configuration models.

func (*DiscoverCnfResp) Descriptor deprecated

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

Deprecated: Use DiscoverCnfResp.ProtoReflect.Descriptor instead.

func (*DiscoverCnfResp) GetCnfMsLabel

func (x *DiscoverCnfResp) GetCnfMsLabel() string

func (*DiscoverCnfResp) GetConfigModels

func (x *DiscoverCnfResp) GetConfigModels() []*DiscoverCnfResp_ConfigModel

func (*DiscoverCnfResp) ProtoMessage

func (*DiscoverCnfResp) ProtoMessage()

func (*DiscoverCnfResp) ProtoReflect

func (x *DiscoverCnfResp) ProtoReflect() protoreflect.Message

func (*DiscoverCnfResp) Reset

func (x *DiscoverCnfResp) Reset()

func (*DiscoverCnfResp) String

func (x *DiscoverCnfResp) String() string

type DiscoverCnfResp_ConfigModel

type DiscoverCnfResp_ConfigModel struct {

	// ProtoName is a name of protobuf message representing the model.
	ProtoName    string `protobuf:"bytes,1,opt,name=proto_name,json=protoName,proto3" json:"proto_name,omitempty"`
	WithPunt     bool   `protobuf:"varint,2,opt,name=with_punt,json=withPunt,proto3" json:"with_punt,omitempty"`
	WithRetrieve bool   `protobuf:"varint,3,opt,name=with_retrieve,json=withRetrieve,proto3" json:"with_retrieve,omitempty"`
	WithDeps     bool   `protobuf:"varint,4,opt,name=with_deps,json=withDeps,proto3" json:"with_deps,omitempty"`
	// contains filtered or unexported fields
}

func (*DiscoverCnfResp_ConfigModel) Descriptor deprecated

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

Deprecated: Use DiscoverCnfResp_ConfigModel.ProtoReflect.Descriptor instead.

func (*DiscoverCnfResp_ConfigModel) GetProtoName

func (x *DiscoverCnfResp_ConfigModel) GetProtoName() string

func (*DiscoverCnfResp_ConfigModel) GetWithDeps

func (x *DiscoverCnfResp_ConfigModel) GetWithDeps() bool

func (*DiscoverCnfResp_ConfigModel) GetWithPunt

func (x *DiscoverCnfResp_ConfigModel) GetWithPunt() bool

func (*DiscoverCnfResp_ConfigModel) GetWithRetrieve

func (x *DiscoverCnfResp_ConfigModel) GetWithRetrieve() bool

func (*DiscoverCnfResp_ConfigModel) ProtoMessage

func (*DiscoverCnfResp_ConfigModel) ProtoMessage()

func (*DiscoverCnfResp_ConfigModel) ProtoReflect

func (*DiscoverCnfResp_ConfigModel) Reset

func (x *DiscoverCnfResp_ConfigModel) Reset()

func (*DiscoverCnfResp_ConfigModel) String

func (x *DiscoverCnfResp_ConfigModel) String() string

type GetDependenciesResp

type GetDependenciesResp struct {
	Dependencies []*ConfigItemDependency `protobuf:"bytes,1,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
	// contains filtered or unexported fields
}

GetDependenciesResp is returned by STONEWORK_MODULE to inform about dependencies of a given configuration item.

func (*GetDependenciesResp) Descriptor deprecated

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

Deprecated: Use GetDependenciesResp.ProtoReflect.Descriptor instead.

func (*GetDependenciesResp) GetDependencies

func (x *GetDependenciesResp) GetDependencies() []*ConfigItemDependency

func (*GetDependenciesResp) ProtoMessage

func (*GetDependenciesResp) ProtoMessage()

func (*GetDependenciesResp) ProtoReflect

func (x *GetDependenciesResp) ProtoReflect() protoreflect.Message

func (*GetDependenciesResp) Reset

func (x *GetDependenciesResp) Reset()

func (*GetDependenciesResp) String

func (x *GetDependenciesResp) String() string

type UnimplementedCnfDiscoveryServer

type UnimplementedCnfDiscoveryServer struct {
}

UnimplementedCnfDiscoveryServer must be embedded to have forward compatible implementations.

func (UnimplementedCnfDiscoveryServer) DiscoverCnf

func (UnimplementedCnfDiscoveryServer) GetItemDependencies

func (UnimplementedCnfDiscoveryServer) GetPuntRequests

type UnsafeCnfDiscoveryServer

type UnsafeCnfDiscoveryServer interface {
	// contains filtered or unexported methods
}

UnsafeCnfDiscoveryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CnfDiscoveryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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