package proto

import "github.com/hashicorp/go-plugin/examples/bidirectional/proto"

Index

Constants

const (
	Counter_Get_FullMethodName = "/proto.Counter/Get"
	Counter_Put_FullMethodName = "/proto.Counter/Put"
)
const (
	AddHelper_Sum_FullMethodName = "/proto.AddHelper/Sum"
)

Variables

var AddHelper_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.AddHelper",
	HandlerType: (*AddHelperServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Sum",
			Handler:    _AddHelper_Sum_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/kv.proto",
}

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

var Counter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Counter",
	HandlerType: (*CounterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Counter_Get_Handler,
		},
		{
			MethodName: "Put",
			Handler:    _Counter_Put_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/kv.proto",
}

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

var File_proto_kv_proto protoreflect.FileDescriptor

Functions

func RegisterAddHelperServer

func RegisterAddHelperServer(s grpc.ServiceRegistrar, srv AddHelperServer)

func RegisterCounterServer

func RegisterCounterServer(s grpc.ServiceRegistrar, srv CounterServer)

Types

type AddHelperClient

type AddHelperClient interface {
	Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error)
}

AddHelperClient is the client API for AddHelper 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 NewAddHelperClient

func NewAddHelperClient(cc grpc.ClientConnInterface) AddHelperClient

type AddHelperServer

type AddHelperServer interface {
	Sum(context.Context, *SumRequest) (*SumResponse, error)
}

AddHelperServer is the server API for AddHelper service. All implementations should embed UnimplementedAddHelperServer for forward compatibility

type CounterClient

type CounterClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error)
}

CounterClient is the client API for Counter 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 NewCounterClient

func NewCounterClient(cc grpc.ClientConnInterface) CounterClient

type CounterServer

type CounterServer interface {
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Put(context.Context, *PutRequest) (*Empty, error)
}

CounterServer is the server API for Counter service. All implementations should embed UnimplementedCounterServer for forward compatibility

type Empty

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

func (*Empty) Descriptor

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetRequest

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

func (*GetRequest) Descriptor

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() string

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 {
	Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetValue

func (x *GetResponse) GetValue() 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 PutRequest

type PutRequest struct {
	AddServer uint32 `protobuf:"varint,1,opt,name=add_server,json=addServer,proto3" json:"add_server,omitempty"`
	Key       string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value     int64  `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*PutRequest) Descriptor

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

Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.

func (*PutRequest) GetAddServer

func (x *PutRequest) GetAddServer() uint32

func (*PutRequest) GetKey

func (x *PutRequest) GetKey() string

func (*PutRequest) GetValue

func (x *PutRequest) GetValue() int64

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) ProtoReflect

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

func (*PutRequest) Reset

func (x *PutRequest) Reset()

func (*PutRequest) String

func (x *PutRequest) String() string

type SumRequest

type SumRequest struct {
	A int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B int64 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"`
	// contains filtered or unexported fields
}

func (*SumRequest) Descriptor

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

Deprecated: Use SumRequest.ProtoReflect.Descriptor instead.

func (*SumRequest) GetA

func (x *SumRequest) GetA() int64

func (*SumRequest) GetB

func (x *SumRequest) GetB() int64

func (*SumRequest) ProtoMessage

func (*SumRequest) ProtoMessage()

func (*SumRequest) ProtoReflect

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

func (*SumRequest) Reset

func (x *SumRequest) Reset()

func (*SumRequest) String

func (x *SumRequest) String() string

type SumResponse

type SumResponse struct {
	R int64 `protobuf:"varint,1,opt,name=r,proto3" json:"r,omitempty"`
	// contains filtered or unexported fields
}

func (*SumResponse) Descriptor

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

Deprecated: Use SumResponse.ProtoReflect.Descriptor instead.

func (*SumResponse) GetR

func (x *SumResponse) GetR() int64

func (*SumResponse) ProtoMessage

func (*SumResponse) ProtoMessage()

func (*SumResponse) ProtoReflect

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

func (*SumResponse) Reset

func (x *SumResponse) Reset()

func (*SumResponse) String

func (x *SumResponse) String() string

type UnimplementedAddHelperServer

type UnimplementedAddHelperServer struct {
}

UnimplementedAddHelperServer should be embedded to have forward compatible implementations.

func (UnimplementedAddHelperServer) Sum

type UnimplementedCounterServer

type UnimplementedCounterServer struct {
}

UnimplementedCounterServer should be embedded to have forward compatible implementations.

func (UnimplementedCounterServer) Get

func (UnimplementedCounterServer) Put

type UnsafeAddHelperServer

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

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

type UnsafeCounterServer

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

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

Source Files

kv.pb.go kv_grpc.pb.go

Version
v1.6.3 (latest)
Published
Jan 23, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
4 days ago

Tools for package owners.