v1

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReduceRequest_WindowOperation_Event_name = map[int32]string{
		0: "OPEN",
		1: "CLOSE",
		4: "APPEND",
	}
	ReduceRequest_WindowOperation_Event_value = map[string]int32{
		"OPEN":   0,
		"CLOSE":  1,
		"APPEND": 4,
	}
)

Enum value maps for ReduceRequest_WindowOperation_Event.

View Source
var File_pkg_apis_proto_reduce_v1_reduce_proto protoreflect.FileDescriptor
View Source
var Reduce_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "reduce.v1.Reduce",
	HandlerType: (*ReduceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IsReady",
			Handler:    _Reduce_IsReady_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ReduceFn",
			Handler:       _Reduce_ReduceFn_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "pkg/apis/proto/reduce/v1/reduce.proto",
}

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

Functions

func RegisterReduceServer

func RegisterReduceServer(s grpc.ServiceRegistrar, srv ReduceServer)

Types

type ReadyResponse

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

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

Deprecated: Use ReadyResponse.ProtoReflect.Descriptor instead.

func (*ReadyResponse) GetReady

func (x *ReadyResponse) GetReady() bool

func (*ReadyResponse) ProtoMessage

func (*ReadyResponse) ProtoMessage()

func (*ReadyResponse) ProtoReflect

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

func (*ReadyResponse) Reset

func (x *ReadyResponse) Reset()

func (*ReadyResponse) String

func (x *ReadyResponse) String() string

type ReduceClient

type ReduceClient interface {
	// ReduceFn applies a reduce function to a request stream.
	ReduceFn(ctx context.Context, opts ...grpc.CallOption) (Reduce_ReduceFnClient, error)
	// IsReady is the heartbeat endpoint for gRPC.
	IsReady(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReadyResponse, error)
}

ReduceClient is the client API for Reduce 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 NewReduceClient

func NewReduceClient(cc grpc.ClientConnInterface) ReduceClient

type ReduceRequest

type ReduceRequest struct {
	Payload   *ReduceRequest_Payload         `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Operation *ReduceRequest_WindowOperation `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"`
	// contains filtered or unexported fields
}

* ReduceRequest represents a request element.

func (*ReduceRequest) Descriptor deprecated

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

Deprecated: Use ReduceRequest.ProtoReflect.Descriptor instead.

func (*ReduceRequest) GetOperation added in v0.7.0

func (x *ReduceRequest) GetOperation() *ReduceRequest_WindowOperation

func (*ReduceRequest) GetPayload added in v0.7.0

func (x *ReduceRequest) GetPayload() *ReduceRequest_Payload

func (*ReduceRequest) ProtoMessage

func (*ReduceRequest) ProtoMessage()

func (*ReduceRequest) ProtoReflect

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

func (*ReduceRequest) Reset

func (x *ReduceRequest) Reset()

func (*ReduceRequest) String

func (x *ReduceRequest) String() string

type ReduceRequest_Payload added in v0.7.0

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

Payload represents a payload element.

func (*ReduceRequest_Payload) Descriptor deprecated added in v0.7.0

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

Deprecated: Use ReduceRequest_Payload.ProtoReflect.Descriptor instead.

func (*ReduceRequest_Payload) GetEventTime added in v0.7.0

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

func (*ReduceRequest_Payload) GetHeaders added in v0.7.0

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

func (*ReduceRequest_Payload) GetKeys added in v0.7.0

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

func (*ReduceRequest_Payload) GetValue added in v0.7.0

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

func (*ReduceRequest_Payload) GetWatermark added in v0.7.0

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

func (*ReduceRequest_Payload) ProtoMessage added in v0.7.0

func (*ReduceRequest_Payload) ProtoMessage()

func (*ReduceRequest_Payload) ProtoReflect added in v0.7.0

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

func (*ReduceRequest_Payload) Reset added in v0.7.0

func (x *ReduceRequest_Payload) Reset()

func (*ReduceRequest_Payload) String added in v0.7.0

func (x *ReduceRequest_Payload) String() string

type ReduceRequest_WindowOperation added in v0.7.0

type ReduceRequest_WindowOperation struct {
	Event   ReduceRequest_WindowOperation_Event `protobuf:"varint,1,opt,name=event,proto3,enum=reduce.v1.ReduceRequest_WindowOperation_Event" json:"event,omitempty"`
	Windows []*Window                           `protobuf:"bytes,2,rep,name=windows,proto3" json:"windows,omitempty"`
	// contains filtered or unexported fields
}

WindowOperation represents a window operation. For Aligned windows, OPEN, APPEND and CLOSE events are sent.

func (*ReduceRequest_WindowOperation) Descriptor deprecated added in v0.7.0

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

Deprecated: Use ReduceRequest_WindowOperation.ProtoReflect.Descriptor instead.

func (*ReduceRequest_WindowOperation) GetEvent added in v0.7.0

func (*ReduceRequest_WindowOperation) GetWindows added in v0.7.0

func (x *ReduceRequest_WindowOperation) GetWindows() []*Window

func (*ReduceRequest_WindowOperation) ProtoMessage added in v0.7.0

func (*ReduceRequest_WindowOperation) ProtoMessage()

func (*ReduceRequest_WindowOperation) ProtoReflect added in v0.7.0

func (*ReduceRequest_WindowOperation) Reset added in v0.7.0

func (x *ReduceRequest_WindowOperation) Reset()

func (*ReduceRequest_WindowOperation) String added in v0.7.0

type ReduceRequest_WindowOperation_Event added in v0.7.0

type ReduceRequest_WindowOperation_Event int32
const (
	ReduceRequest_WindowOperation_OPEN   ReduceRequest_WindowOperation_Event = 0
	ReduceRequest_WindowOperation_CLOSE  ReduceRequest_WindowOperation_Event = 1
	ReduceRequest_WindowOperation_APPEND ReduceRequest_WindowOperation_Event = 4
)

func (ReduceRequest_WindowOperation_Event) Descriptor added in v0.7.0

func (ReduceRequest_WindowOperation_Event) Enum added in v0.7.0

func (ReduceRequest_WindowOperation_Event) EnumDescriptor deprecated added in v0.7.0

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

Deprecated: Use ReduceRequest_WindowOperation_Event.Descriptor instead.

func (ReduceRequest_WindowOperation_Event) Number added in v0.7.0

func (ReduceRequest_WindowOperation_Event) String added in v0.7.0

func (ReduceRequest_WindowOperation_Event) Type added in v0.7.0

type ReduceResponse

type ReduceResponse struct {
	Result *ReduceResponse_Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// window represents a window to which the result belongs.
	Window *Window `protobuf:"bytes,2,opt,name=window,proto3" json:"window,omitempty"`
	// EOF represents the end of the response for a window.
	EOF bool `protobuf:"varint,3,opt,name=EOF,proto3" json:"EOF,omitempty"`
	// contains filtered or unexported fields
}

* ReduceResponse represents a response element.

func (*ReduceResponse) Descriptor deprecated

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

Deprecated: Use ReduceResponse.ProtoReflect.Descriptor instead.

func (*ReduceResponse) GetEOF added in v0.7.0

func (x *ReduceResponse) GetEOF() bool

func (*ReduceResponse) GetResult added in v0.7.0

func (x *ReduceResponse) GetResult() *ReduceResponse_Result

func (*ReduceResponse) GetWindow added in v0.7.0

func (x *ReduceResponse) GetWindow() *Window

func (*ReduceResponse) ProtoMessage

func (*ReduceResponse) ProtoMessage()

func (*ReduceResponse) ProtoReflect

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

func (*ReduceResponse) Reset

func (x *ReduceResponse) Reset()

func (*ReduceResponse) String

func (x *ReduceResponse) String() string

type ReduceResponse_Result

type ReduceResponse_Result 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"`
	Tags  []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

Result represents a result element. It contains the result of the reduce function.

func (*ReduceResponse_Result) Descriptor deprecated

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

Deprecated: Use ReduceResponse_Result.ProtoReflect.Descriptor instead.

func (*ReduceResponse_Result) GetKeys

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

func (*ReduceResponse_Result) GetTags

func (x *ReduceResponse_Result) GetTags() []string

func (*ReduceResponse_Result) GetValue

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

func (*ReduceResponse_Result) ProtoMessage

func (*ReduceResponse_Result) ProtoMessage()

func (*ReduceResponse_Result) ProtoReflect

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

func (*ReduceResponse_Result) Reset

func (x *ReduceResponse_Result) Reset()

func (*ReduceResponse_Result) String

func (x *ReduceResponse_Result) String() string

type ReduceServer

type ReduceServer interface {
	// ReduceFn applies a reduce function to a request stream.
	ReduceFn(Reduce_ReduceFnServer) error
	// IsReady is the heartbeat endpoint for gRPC.
	IsReady(context.Context, *emptypb.Empty) (*ReadyResponse, error)
	// contains filtered or unexported methods
}

ReduceServer is the server API for Reduce service. All implementations must embed UnimplementedReduceServer for forward compatibility

type Reduce_ReduceFnClient

type Reduce_ReduceFnClient interface {
	Send(*ReduceRequest) error
	Recv() (*ReduceResponse, error)
	grpc.ClientStream
}

type Reduce_ReduceFnServer

type Reduce_ReduceFnServer interface {
	Send(*ReduceResponse) error
	Recv() (*ReduceRequest, error)
	grpc.ServerStream
}

type UnimplementedReduceServer

type UnimplementedReduceServer struct {
}

UnimplementedReduceServer must be embedded to have forward compatible implementations.

func (UnimplementedReduceServer) IsReady

func (UnimplementedReduceServer) ReduceFn

type UnsafeReduceServer

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

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

type Window added in v0.7.0

type Window struct {
	Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	End   *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	Slot  string                 `protobuf:"bytes,3,opt,name=slot,proto3" json:"slot,omitempty"`
	// contains filtered or unexported fields
}

Window represents a window. Since the client doesn't track keys, window doesn't have a keys field.

func (*Window) Descriptor deprecated added in v0.7.0

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

Deprecated: Use Window.ProtoReflect.Descriptor instead.

func (*Window) GetEnd added in v0.7.0

func (x *Window) GetEnd() *timestamppb.Timestamp

func (*Window) GetSlot added in v0.7.0

func (x *Window) GetSlot() string

func (*Window) GetStart added in v0.7.0

func (x *Window) GetStart() *timestamppb.Timestamp

func (*Window) ProtoMessage added in v0.7.0

func (*Window) ProtoMessage()

func (*Window) ProtoReflect added in v0.7.0

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

func (*Window) Reset added in v0.7.0

func (x *Window) Reset()

func (*Window) String added in v0.7.0

func (x *Window) String() string

Directories

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

Jump to

Keyboard shortcuts

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