v1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Sink_SinkFn_FullMethodName  = "/sink.v1.Sink/SinkFn"
	Sink_IsReady_FullMethodName = "/sink.v1.Sink/IsReady"
)

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "SUCCESS",
		1: "FAILURE",
		2: "FALLBACK",
	}
	Status_value = map[string]int32{
		"SUCCESS":  0,
		"FAILURE":  1,
		"FALLBACK": 2,
	}
)

Enum value maps for Status.

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,
			ServerStreams: true,
			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 Handshake added in v0.9.0

type Handshake struct {

	// Required field indicating the start of transmission.
	Sot bool `protobuf:"varint,1,opt,name=sot,proto3" json:"sot,omitempty"`
	// contains filtered or unexported fields
}

Handshake message between client and server to indicate the start of transmission.

func (*Handshake) Descriptor deprecated added in v0.9.0

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

Deprecated: Use Handshake.ProtoReflect.Descriptor instead.

func (*Handshake) GetSot added in v0.9.0

func (x *Handshake) GetSot() bool

func (*Handshake) ProtoMessage added in v0.9.0

func (*Handshake) ProtoMessage()

func (*Handshake) ProtoReflect added in v0.9.0

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

func (*Handshake) Reset added in v0.9.0

func (x *Handshake) Reset()

func (*Handshake) String added in v0.9.0

func (x *Handshake) String() string

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 {

	// Required field indicating the request.
	Request *SinkRequest_Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// Required field indicating the status of the request.
	// If eot is set to true, it indicates the end of transmission.
	Status *TransmissionStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// optional field indicating the handshake message.
	Handshake *Handshake `protobuf:"bytes,3,opt,name=handshake,proto3,oneof" json:"handshake,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) GetHandshake added in v0.9.0

func (x *SinkRequest) GetHandshake() *Handshake

func (*SinkRequest) GetRequest added in v0.9.0

func (x *SinkRequest) GetRequest() *SinkRequest_Request

func (*SinkRequest) GetStatus added in v0.9.0

func (x *SinkRequest) GetStatus() *TransmissionStatus

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 SinkRequest_Request added in v0.9.0

type SinkRequest_Request 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"`
	Headers   map[string]string      `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SinkRequest_Request) Descriptor deprecated added in v0.9.0

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

Deprecated: Use SinkRequest_Request.ProtoReflect.Descriptor instead.

func (*SinkRequest_Request) GetEventTime added in v0.9.0

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

func (*SinkRequest_Request) GetHeaders added in v0.9.0

func (x *SinkRequest_Request) GetHeaders() map[string]string

func (*SinkRequest_Request) GetId added in v0.9.0

func (x *SinkRequest_Request) GetId() string

func (*SinkRequest_Request) GetKeys added in v0.9.0

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

func (*SinkRequest_Request) GetValue added in v0.9.0

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

func (*SinkRequest_Request) GetWatermark added in v0.9.0

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

func (*SinkRequest_Request) ProtoMessage added in v0.9.0

func (*SinkRequest_Request) ProtoMessage()

func (*SinkRequest_Request) ProtoReflect added in v0.9.0

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

func (*SinkRequest_Request) Reset added in v0.9.0

func (x *SinkRequest_Request) Reset()

func (*SinkRequest_Request) String added in v0.9.0

func (x *SinkRequest_Request) 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"`
	Handshake *Handshake             `protobuf:"bytes,2,opt,name=handshake,proto3,oneof" json:"handshake,omitempty"`
	Status    *TransmissionStatus    `protobuf:"bytes,3,opt,name=status,proto3,oneof" json:"status,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) GetHandshake added in v0.9.0

func (x *SinkResponse) GetHandshake() *Handshake

func (*SinkResponse) GetResults added in v0.5.0

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

func (*SinkResponse) GetStatus added in v0.9.0

func (x *SinkResponse) GetStatus() *TransmissionStatus

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"`
	// status denotes the status of persisting to sink. It can be SUCCESS, FAILURE, or FALLBACK.
	Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=sink.v1.Status" json:"status,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) GetStatus added in v0.7.0

func (x *SinkResponse_Result) GetStatus() Status

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
	Recv() (*SinkResponse, error)
	grpc.ClientStream
}

type Sink_SinkFnServer added in v0.5.0

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

type Status added in v0.7.0

type Status int32

Status is the status of the response.

const (
	Status_SUCCESS  Status = 0
	Status_FAILURE  Status = 1
	Status_FALLBACK Status = 2
)

func (Status) Descriptor added in v0.7.0

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum added in v0.7.0

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated added in v0.7.0

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number added in v0.7.0

func (x Status) Number() protoreflect.EnumNumber

func (Status) String added in v0.7.0

func (x Status) String() string

func (Status) Type added in v0.7.0

func (Status) Type() protoreflect.EnumType

type TransmissionStatus added in v0.9.0

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

* TransmissionStatus is the status of the transmission.

func (*TransmissionStatus) Descriptor deprecated added in v0.9.0

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

Deprecated: Use TransmissionStatus.ProtoReflect.Descriptor instead.

func (*TransmissionStatus) GetEot added in v0.9.0

func (x *TransmissionStatus) GetEot() bool

func (*TransmissionStatus) ProtoMessage added in v0.9.0

func (*TransmissionStatus) ProtoMessage()

func (*TransmissionStatus) ProtoReflect added in v0.9.0

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

func (*TransmissionStatus) Reset added in v0.9.0

func (x *TransmissionStatus) Reset()

func (*TransmissionStatus) String added in v0.9.0

func (x *TransmissionStatus) String() string

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