writer

package
v0.0.0-...-cb9e034 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_io_writer_writer_proto protoreflect.FileDescriptor
View Source
var Writer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "io.writer.Writer",
	HandlerType: (*WriterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Write",
			Handler:    _Writer_Write_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "io/writer/writer.proto",
}

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

Functions

func RegisterWriterServer

func RegisterWriterServer(s grpc.ServiceRegistrar, srv WriterServer)

Types

type UnimplementedWriterServer

type UnimplementedWriterServer struct {
}

UnimplementedWriterServer must be embedded to have forward compatible implementations.

func (UnimplementedWriterServer) Write

type UnsafeWriterServer

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

UnsafeWriterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WriterServer 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 {

	// written is the length of payload in bytes
	Written int32 `protobuf:"varint,1,opt,name=written,proto3" json:"written,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) GetWritten

func (x *WriteResponse) GetWritten() 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

type WriterClient

type WriterClient interface {
	// Write writes len(p) bytes from p to the underlying data stream.
	Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
}

WriterClient is the client API for Writer 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 NewWriterClient

func NewWriterClient(cc grpc.ClientConnInterface) WriterClient

type WriterServer

type WriterServer interface {
	// Write writes len(p) bytes from p to the underlying data stream.
	Write(context.Context, *WriteRequest) (*WriteResponse, error)
	// contains filtered or unexported methods
}

WriterServer is the server API for Writer service. All implementations must embed UnimplementedWriterServer for forward compatibility

Jump to

Keyboard shortcuts

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