gconnproto

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conn_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gconnproto.Conn",
	HandlerType: (*ConnServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Read",
			Handler:    _Conn_Read_Handler,
		},
		{
			MethodName: "Write",
			Handler:    _Conn_Write_Handler,
		},
		{
			MethodName: "Close",
			Handler:    _Conn_Close_Handler,
		},
		{
			MethodName: "SetDeadline",
			Handler:    _Conn_SetDeadline_Handler,
		},
		{
			MethodName: "SetReadDeadline",
			Handler:    _Conn_SetReadDeadline_Handler,
		},
		{
			MethodName: "SetWriteDeadline",
			Handler:    _Conn_SetWriteDeadline_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gconnproto/conn.proto",
}

Conn_ServiceDesc is the grpc.ServiceDesc for Conn 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_gconnproto_conn_proto protoreflect.FileDescriptor

Functions

func RegisterConnServer

func RegisterConnServer(s grpc.ServiceRegistrar, srv ConnServer)

Types

type ConnClient

type ConnClient interface {
	// Read reads data from the connection.
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
	// Write writes data to the connection.
	Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
	// Close closes the connection.
	Close(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// SetDeadline sets the read and write deadlines associated
	// with the connection.
	SetDeadline(ctx context.Context, in *SetDeadlineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// SetReadDeadline sets the deadline for future Read calls
	// and any currently-blocked Read call.
	SetReadDeadline(ctx context.Context, in *SetDeadlineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// SetWriteDeadline sets the deadline for future Write calls
	// and any currently-blocked Write call.
	SetWriteDeadline(ctx context.Context, in *SetDeadlineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ConnClient is the client API for Conn 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 NewConnClient

func NewConnClient(cc grpc.ClientConnInterface) ConnClient

type ConnServer

type ConnServer interface {
	// Read reads data from the connection.
	Read(context.Context, *ReadRequest) (*ReadResponse, error)
	// Write writes data to the connection.
	Write(context.Context, *WriteRequest) (*WriteResponse, error)
	// Close closes the connection.
	Close(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// SetDeadline sets the read and write deadlines associated
	// with the connection.
	SetDeadline(context.Context, *SetDeadlineRequest) (*emptypb.Empty, error)
	// SetReadDeadline sets the deadline for future Read calls
	// and any currently-blocked Read call.
	SetReadDeadline(context.Context, *SetDeadlineRequest) (*emptypb.Empty, error)
	// SetWriteDeadline sets the deadline for future Write calls
	// and any currently-blocked Write call.
	SetWriteDeadline(context.Context, *SetDeadlineRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ConnServer is the server API for Conn service. All implementations must embed UnimplementedConnServer for forward compatibility

type ReadRequest

type ReadRequest struct {

	// length of the request in bytes
	Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetLength

func (x *ReadRequest) GetLength() int32

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

type ReadResponse struct {

	// read is the payload in bytes
	Read []byte `protobuf:"bytes,1,opt,name=read,proto3" json:"read,omitempty"`
	// error is an error message
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// errored is true if an error has been set
	Errored bool `protobuf:"varint,3,opt,name=errored,proto3" json:"errored,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetError

func (x *ReadResponse) GetError() string

func (*ReadResponse) GetErrored

func (x *ReadResponse) GetErrored() bool

func (*ReadResponse) GetRead

func (x *ReadResponse) GetRead() []byte

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

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

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type SetDeadlineRequest

type SetDeadlineRequest struct {

	// time represents an instant in time in bytes
	Time []byte `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*SetDeadlineRequest) Descriptor deprecated

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

Deprecated: Use SetDeadlineRequest.ProtoReflect.Descriptor instead.

func (*SetDeadlineRequest) GetTime

func (x *SetDeadlineRequest) GetTime() []byte

func (*SetDeadlineRequest) ProtoMessage

func (*SetDeadlineRequest) ProtoMessage()

func (*SetDeadlineRequest) ProtoReflect

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

func (*SetDeadlineRequest) Reset

func (x *SetDeadlineRequest) Reset()

func (*SetDeadlineRequest) String

func (x *SetDeadlineRequest) String() string

type UnimplementedConnServer

type UnimplementedConnServer struct {
}

UnimplementedConnServer must be embedded to have forward compatible implementations.

func (UnimplementedConnServer) Close

func (UnimplementedConnServer) Read

func (UnimplementedConnServer) SetDeadline

func (UnimplementedConnServer) SetReadDeadline

func (UnimplementedConnServer) SetWriteDeadline

func (UnimplementedConnServer) Write

type UnsafeConnServer

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

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

type WriteRequest

type WriteRequest struct {

	// payload is the write request in bytes
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteRequest) Descriptor deprecated

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

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetPayload

func (x *WriteRequest) GetPayload() []byte

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) ProtoReflect

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

func (*WriteRequest) Reset

func (x *WriteRequest) Reset()

func (*WriteRequest) String

func (x *WriteRequest) String() string

type WriteResponse

type WriteResponse struct {

	// length of the response in bytes
	Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
	// error is an error message
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// errored is true if an error has been set
	Errored bool `protobuf:"varint,3,opt,name=errored,proto3" json:"errored,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteResponse) Descriptor deprecated

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

Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.

func (*WriteResponse) GetError

func (x *WriteResponse) GetError() string

func (*WriteResponse) GetErrored

func (x *WriteResponse) GetErrored() bool

func (*WriteResponse) GetLength

func (x *WriteResponse) GetLength() int32

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) ProtoReflect

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

func (*WriteResponse) Reset

func (x *WriteResponse) Reset()

func (*WriteResponse) String

func (x *WriteResponse) String() string

Jump to

Keyboard shortcuts

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