control

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Item_DataType_name = map[int32]string{
		0: "POLICIES",
		1: "CONTENT",
	}
	Item_DataType_value = map[string]int32{
		"POLICIES": 0,
		"CONTENT":  1,
	}
)

Enum value maps for Item_DataType.

View Source
var (
	Response_Status_name = map[int32]string{
		0: "ACK",
		1: "ERROR",
		2: "TAG_ERROR",
	}
	Response_Status_value = map[string]int32{
		"ACK":       0,
		"ERROR":     1,
		"TAG_ERROR": 2,
	}
)

Enum value maps for Response_Status.

View Source
var File_control_proto protoreflect.FileDescriptor

Functions

func RegisterPDPControlServer

func RegisterPDPControlServer(s *grpc.Server, srv PDPControlServer)

Types

type Chunk

type Chunk struct {
	Id   int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Chunk) Descriptor deprecated

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

Deprecated: Use Chunk.ProtoReflect.Descriptor instead.

func (*Chunk) GetData

func (x *Chunk) GetData() []byte

func (*Chunk) GetId

func (x *Chunk) GetId() int32

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) ProtoReflect added in v0.0.4

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

func (*Chunk) Reset

func (x *Chunk) Reset()

func (*Chunk) String

func (x *Chunk) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v0.0.4

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Item

type Item struct {
	Type    Item_DataType `protobuf:"varint,1,opt,name=type,proto3,enum=control.Item_DataType" json:"type,omitempty"`
	FromTag string        `protobuf:"bytes,2,opt,name=fromTag,proto3" json:"fromTag,omitempty"`
	ToTag   string        `protobuf:"bytes,3,opt,name=toTag,proto3" json:"toTag,omitempty"`
	Id      string        `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetFromTag

func (x *Item) GetFromTag() string

func (*Item) GetId

func (x *Item) GetId() string

func (*Item) GetToTag

func (x *Item) GetToTag() string

func (*Item) GetType

func (x *Item) GetType() Item_DataType

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect added in v0.0.4

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

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

type Item_DataType

type Item_DataType int32
const (
	Item_POLICIES Item_DataType = 0
	Item_CONTENT  Item_DataType = 1
)

func (Item_DataType) Descriptor added in v0.0.4

func (Item_DataType) Enum added in v0.0.4

func (x Item_DataType) Enum() *Item_DataType

func (Item_DataType) EnumDescriptor deprecated

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

Deprecated: Use Item_DataType.Descriptor instead.

func (Item_DataType) Number added in v0.0.4

func (Item_DataType) String

func (x Item_DataType) String() string

func (Item_DataType) Type added in v0.0.4

type PDPControlClient

type PDPControlClient interface {
	Request(ctx context.Context, in *Item, opts ...grpc.CallOption) (*Response, error)
	Upload(ctx context.Context, opts ...grpc.CallOption) (PDPControl_UploadClient, error)
	Apply(ctx context.Context, in *Update, opts ...grpc.CallOption) (*Response, error)
	NotifyReady(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Response, error)
}

PDPControlClient is the client API for PDPControl service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPDPControlClient

func NewPDPControlClient(cc grpc.ClientConnInterface) PDPControlClient

type PDPControlServer

type PDPControlServer interface {
	Request(context.Context, *Item) (*Response, error)
	Upload(PDPControl_UploadServer) error
	Apply(context.Context, *Update) (*Response, error)
	NotifyReady(context.Context, *Empty) (*Response, error)
}

PDPControlServer is the server API for PDPControl service.

type PDPControl_UploadClient

type PDPControl_UploadClient interface {
	Send(*Chunk) error
	CloseAndRecv() (*Response, error)
	grpc.ClientStream
}

type PDPControl_UploadServer

type PDPControl_UploadServer interface {
	SendAndClose(*Response) error
	Recv() (*Chunk, error)
	grpc.ServerStream
}

type Response

type Response struct {
	Status  Response_Status `protobuf:"varint,1,opt,name=status,proto3,enum=control.Response_Status" json:"status,omitempty"`
	Id      int32           `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Details string          `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetDetails

func (x *Response) GetDetails() string

func (*Response) GetId

func (x *Response) GetId() int32

func (*Response) GetStatus

func (x *Response) GetStatus() Response_Status

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect added in v0.0.4

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Response_Status

type Response_Status int32
const (
	Response_ACK       Response_Status = 0
	Response_ERROR     Response_Status = 1
	Response_TAG_ERROR Response_Status = 2
)

func (Response_Status) Descriptor added in v0.0.4

func (Response_Status) Enum added in v0.0.4

func (x Response_Status) Enum() *Response_Status

func (Response_Status) EnumDescriptor deprecated

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

Deprecated: Use Response_Status.Descriptor instead.

func (Response_Status) Number added in v0.0.4

func (Response_Status) String

func (x Response_Status) String() string

func (Response_Status) Type added in v0.0.4

type UnimplementedPDPControlServer added in v0.0.4

type UnimplementedPDPControlServer struct {
}

UnimplementedPDPControlServer can be embedded to have forward compatible implementations.

func (*UnimplementedPDPControlServer) Apply added in v0.0.4

func (*UnimplementedPDPControlServer) NotifyReady added in v0.0.4

func (*UnimplementedPDPControlServer) Request added in v0.0.4

func (*UnimplementedPDPControlServer) Upload added in v0.0.4

type Update

type Update struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Update) Descriptor deprecated

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

Deprecated: Use Update.ProtoReflect.Descriptor instead.

func (*Update) GetId

func (x *Update) GetId() int32

func (*Update) ProtoMessage

func (*Update) ProtoMessage()

func (*Update) ProtoReflect added in v0.0.4

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

func (*Update) Reset

func (x *Update) Reset()

func (*Update) String

func (x *Update) String() string

Jump to

Keyboard shortcuts

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