v1

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_apis_proto_sink_v1_sink_proto protoreflect.FileDescriptor
View Source
var Sink_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sink.v1.Sink",
	HandlerType: (*SinkServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IsReady",
			Handler:    _Sink_IsReady_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SinkFn",
			Handler:       _Sink_SinkFn_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "pkg/apis/proto/sink/v1/sink.proto",
}

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

Functions

func RegisterSinkServer added in v0.5.0

func RegisterSinkServer(s grpc.ServiceRegistrar, srv SinkServer)

Types

type ReadyResponse added in v0.2.3

type ReadyResponse struct {
	Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
	// contains filtered or unexported fields
}

* ReadyResponse is the health check result.

func (*ReadyResponse) Descriptor deprecated added in v0.2.3

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

Deprecated: Use ReadyResponse.ProtoReflect.Descriptor instead.

func (*ReadyResponse) GetReady added in v0.2.3

func (x *ReadyResponse) GetReady() bool

func (*ReadyResponse) ProtoMessage added in v0.2.3

func (*ReadyResponse) ProtoMessage()

func (*ReadyResponse) ProtoReflect added in v0.2.3

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

func (*ReadyResponse) Reset added in v0.2.3

func (x *ReadyResponse) Reset()

func (*ReadyResponse) String added in v0.2.3

func (x *ReadyResponse) String() string

type SinkClient added in v0.5.0

type SinkClient interface {
	// SinkFn writes the request to a user defined sink.
	SinkFn(ctx context.Context, opts ...grpc.CallOption) (Sink_SinkFnClient, error)
	// IsReady is the heartbeat endpoint for gRPC.
	IsReady(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReadyResponse, error)
}

SinkClient is the client API for Sink 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 NewSinkClient added in v0.5.0

func NewSinkClient(cc grpc.ClientConnInterface) SinkClient

type SinkRequest added in v0.5.0

type SinkRequest struct {
	Keys      []string               `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	Value     []byte                 `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	EventTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"`
	Watermark *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=watermark,proto3" json:"watermark,omitempty"`
	Id        string                 `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

* SinkRequest represents a request element.

func (*SinkRequest) Descriptor deprecated added in v0.5.0

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

Deprecated: Use SinkRequest.ProtoReflect.Descriptor instead.

func (*SinkRequest) GetEventTime added in v0.5.0

func (x *SinkRequest) GetEventTime() *timestamppb.Timestamp

func (*SinkRequest) GetId added in v0.5.0

func (x *SinkRequest) GetId() string

func (*SinkRequest) GetKeys added in v0.5.0

func (x *SinkRequest) GetKeys() []string

func (*SinkRequest) GetValue added in v0.5.0

func (x *SinkRequest) GetValue() []byte

func (*SinkRequest) GetWatermark added in v0.5.0

func (x *SinkRequest) GetWatermark() *timestamppb.Timestamp

func (*SinkRequest) ProtoMessage added in v0.5.0

func (*SinkRequest) ProtoMessage()

func (*SinkRequest) ProtoReflect added in v0.5.0

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

func (*SinkRequest) Reset added in v0.5.0

func (x *SinkRequest) Reset()

func (*SinkRequest) String added in v0.5.0

func (x *SinkRequest) String() string

type SinkResponse added in v0.5.0

type SinkResponse struct {
	Results []*SinkResponse_Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

* SinkResponse is the individual response of each message written to the sink.

func (*SinkResponse) Descriptor deprecated added in v0.5.0

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

Deprecated: Use SinkResponse.ProtoReflect.Descriptor instead.

func (*SinkResponse) GetResults added in v0.5.0

func (x *SinkResponse) GetResults() []*SinkResponse_Result

func (*SinkResponse) ProtoMessage added in v0.5.0

func (*SinkResponse) ProtoMessage()

func (*SinkResponse) ProtoReflect added in v0.5.0

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

func (*SinkResponse) Reset added in v0.5.0

func (x *SinkResponse) Reset()

func (*SinkResponse) String added in v0.5.0

func (x *SinkResponse) String() string

type SinkResponse_Result added in v0.5.0

type SinkResponse_Result struct {

	// id is the ID of the message, can be used to uniquely identify the message.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// success denotes the status of persisting to disk. if set to false, it means writing to sink for the message failed.
	Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	// err_msg is the error message, set it if success is set to false.
	ErrMsg string `protobuf:"bytes,3,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
	// contains filtered or unexported fields
}

func (*SinkResponse_Result) Descriptor deprecated added in v0.5.0

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

Deprecated: Use SinkResponse_Result.ProtoReflect.Descriptor instead.

func (*SinkResponse_Result) GetErrMsg added in v0.5.0

func (x *SinkResponse_Result) GetErrMsg() string

func (*SinkResponse_Result) GetId added in v0.5.0

func (x *SinkResponse_Result) GetId() string

func (*SinkResponse_Result) GetSuccess added in v0.5.0

func (x *SinkResponse_Result) GetSuccess() bool

func (*SinkResponse_Result) ProtoMessage added in v0.5.0

func (*SinkResponse_Result) ProtoMessage()

func (*SinkResponse_Result) ProtoReflect added in v0.5.0

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

func (*SinkResponse_Result) Reset added in v0.5.0

func (x *SinkResponse_Result) Reset()

func (*SinkResponse_Result) String added in v0.5.0

func (x *SinkResponse_Result) String() string

type SinkServer added in v0.5.0

type SinkServer interface {
	// SinkFn writes the request to a user defined sink.
	SinkFn(Sink_SinkFnServer) error
	// IsReady is the heartbeat endpoint for gRPC.
	IsReady(context.Context, *emptypb.Empty) (*ReadyResponse, error)
	// contains filtered or unexported methods
}

SinkServer is the server API for Sink service. All implementations must embed UnimplementedSinkServer for forward compatibility

type Sink_SinkFnClient added in v0.5.0

type Sink_SinkFnClient interface {
	Send(*SinkRequest) error
	CloseAndRecv() (*SinkResponse, error)
	grpc.ClientStream
}

type Sink_SinkFnServer added in v0.5.0

type Sink_SinkFnServer interface {
	SendAndClose(*SinkResponse) error
	Recv() (*SinkRequest, error)
	grpc.ServerStream
}

type UnimplementedSinkServer added in v0.5.0

type UnimplementedSinkServer struct {
}

UnimplementedSinkServer must be embedded to have forward compatible implementations.

func (UnimplementedSinkServer) IsReady added in v0.5.0

func (UnimplementedSinkServer) SinkFn added in v0.5.0

type UnsafeSinkServer added in v0.5.0

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

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

Directories

Path Synopsis
Package sinkmock is a generated GoMock package.
Package sinkmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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