core

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SetResponseStatus_name = map[int32]string{
		0: "OK",
		1: "ERROR",
	}
	SetResponseStatus_value = map[string]int32{
		"OK":    0,
		"ERROR": 1,
	}
)

Enum value maps for SetResponseStatus.

View Source
var File_gosdn_core_core_proto protoreflect.FileDescriptor

Functions

func RegisterCoreServer

func RegisterCoreServer(s *grpc.Server, srv CoreServer)

Types

type CoreClient

type CoreClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
}

CoreClient is the client API for Core 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.

func NewCoreClient

func NewCoreClient(cc grpc.ClientConnInterface) CoreClient

type CoreServer

type CoreServer interface {
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Set(context.Context, *SetRequest) (*SetResponse, error)
	// contains filtered or unexported methods
}

CoreServer is the server API for Core service. All implementations must embed UnimplementedCoreServer for forward compatibility

type GetRequest

type GetRequest struct {
	Timestamp int64    `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	All       bool     `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"`
	Pid       []string `protobuf:"bytes,3,rep,name=pid,proto3" json:"pid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetAll

func (x *GetRequest) GetAll() bool

func (*GetRequest) GetPid

func (x *GetRequest) GetPid() []string

func (*GetRequest) GetTimestamp

func (x *GetRequest) GetTimestamp() int64

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Timestamp int64                         `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	Pnd       []*pnd.PrincipalNetworkDomain `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetPnd

func (x *GetResponse) GetPnd() []*pnd.PrincipalNetworkDomain

func (*GetResponse) GetTimestamp

func (x *GetResponse) GetTimestamp() int64

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type SetPnd

type SetPnd struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Sbi         string `protobuf:"bytes,3,opt,name=sbi,proto3" json:"sbi,omitempty"`
	// contains filtered or unexported fields
}

func (*SetPnd) Descriptor deprecated

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

Deprecated: Use SetPnd.ProtoReflect.Descriptor instead.

func (*SetPnd) GetDescription

func (x *SetPnd) GetDescription() string

func (*SetPnd) GetName

func (x *SetPnd) GetName() string

func (*SetPnd) GetSbi

func (x *SetPnd) GetSbi() string

func (*SetPnd) ProtoMessage

func (*SetPnd) ProtoMessage()

func (*SetPnd) ProtoReflect

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

func (*SetPnd) Reset

func (x *SetPnd) Reset()

func (*SetPnd) String

func (x *SetPnd) String() string

type SetRequest

type SetRequest struct {
	Timestamp int64     `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	Pnd       []*SetPnd `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"`
	// contains filtered or unexported fields
}

func (*SetRequest) Descriptor deprecated

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

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetPnd

func (x *SetRequest) GetPnd() []*SetPnd

func (*SetRequest) GetTimestamp

func (x *SetRequest) GetTimestamp() int64

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

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

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

type SetResponse

type SetResponse struct {
	Timestamp int64             `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	Status    SetResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.core.SetResponseStatus" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*SetResponse) Descriptor deprecated

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

Deprecated: Use SetResponse.ProtoReflect.Descriptor instead.

func (*SetResponse) GetStatus

func (x *SetResponse) GetStatus() SetResponseStatus

func (*SetResponse) GetTimestamp

func (x *SetResponse) GetTimestamp() int64

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) ProtoReflect

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

func (*SetResponse) Reset

func (x *SetResponse) Reset()

func (*SetResponse) String

func (x *SetResponse) String() string

type SetResponseStatus

type SetResponseStatus int32
const (
	SetResponse_OK    SetResponseStatus = 0
	SetResponse_ERROR SetResponseStatus = 1
)

func (SetResponseStatus) Descriptor

func (SetResponseStatus) Enum

func (SetResponseStatus) EnumDescriptor deprecated

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

Deprecated: Use SetResponseStatus.Descriptor instead.

func (SetResponseStatus) Number

func (SetResponseStatus) String

func (x SetResponseStatus) String() string

func (SetResponseStatus) Type

type UnimplementedCoreServer

type UnimplementedCoreServer struct {
}

UnimplementedCoreServer must be embedded to have forward compatible implementations.

func (*UnimplementedCoreServer) Get

func (*UnimplementedCoreServer) Set

Jump to

Keyboard shortcuts

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