Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMassTaskerServer(s grpc.ServiceRegistrar, srv MassTaskerServer)
- type BulkSetRequest
- func (*BulkSetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BulkSetRequest) GetPrototype() *Task
- func (x *BulkSetRequest) GetRef() []*TaskRef
- func (*BulkSetRequest) ProtoMessage()
- func (x *BulkSetRequest) ProtoReflect() protoreflect.Message
- func (x *BulkSetRequest) Reset()
- func (x *BulkSetRequest) String() string
- type BulkSetResponse
- type DebugRequest
- func (*DebugRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DebugRequest) GetGroup() string
- func (x *DebugRequest) GetLimit() uint64
- func (*DebugRequest) ProtoMessage()
- func (x *DebugRequest) ProtoReflect() protoreflect.Message
- func (x *DebugRequest) Reset()
- func (x *DebugRequest) String() string
- type DebugResponse
- func (*DebugResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DebugResponse) GetNumTasks() uint64
- func (x *DebugResponse) GetTasks() []*Task
- func (*DebugResponse) ProtoMessage()
- func (x *DebugResponse) ProtoReflect() protoreflect.Message
- func (x *DebugResponse) Reset()
- func (x *DebugResponse) String() string
- type LabelSelector
- type MassTaskerClient
- type MassTaskerServer
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRequest) GetGroup() string
- func (x *QueryRequest) GetNow() *timestamppb.Timestamp
- func (x *QueryRequest) GetOwnFor() *durationpb.Duration
- func (x *QueryRequest) GetWait() bool
- func (*QueryRequest) ProtoMessage()
- func (x *QueryRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRequest) Reset()
- func (x *QueryRequest) String() string
- type QueryResponse
- type Task
- func (x *Task) Clone() *Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetData() *anypb.Any
- func (x *Task) GetError() string
- func (x *Task) GetGroup() string
- func (x *Task) GetId() uint64
- func (x *Task) GetLabels() map[string]string
- func (x *Task) GetNotBefore() *timestamppb.Timestamp
- func (t *Task) MarshalFrom(data proto.Message) error
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- func (t *Task) UnmarshalTo(dst proto.Message) error
- type TaskRef
- func (*TaskRef) Descriptor() ([]byte, []int)deprecated
- func (x *TaskRef) GetGroup() string
- func (x *TaskRef) GetId() uint64
- func (m *TaskRef) GetSel() isTaskRef_Sel
- func (x *TaskRef) GetSelector() *LabelSelector
- func (*TaskRef) ProtoMessage()
- func (x *TaskRef) ProtoReflect() protoreflect.Message
- func (x *TaskRef) Reset()
- func (x *TaskRef) String() string
- type TaskRef_Group
- type TaskRef_Id
- type TaskRef_Selector
- type Test
- type UnimplementedMassTaskerServer
- func (UnimplementedMassTaskerServer) BulkSet(context.Context, *BulkSetRequest) (*BulkSetResponse, error)
- func (UnimplementedMassTaskerServer) Debug(context.Context, *DebugRequest) (*DebugResponse, error)
- func (UnimplementedMassTaskerServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
- func (UnimplementedMassTaskerServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeMassTaskerServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetCreated() []*Task
- func (x *UpdateRequest) GetDeleted() []*TaskRef
- func (x *UpdateRequest) GetPredicates() []uint64
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
Constants ¶
const ( MassTasker_Update_FullMethodName = "/masstasker.MassTasker/Update" MassTasker_Query_FullMethodName = "/masstasker.MassTasker/Query" MassTasker_BulkSet_FullMethodName = "/masstasker.MassTasker/BulkSet" MassTasker_Debug_FullMethodName = "/masstasker.MassTasker/Debug" )
Variables ¶
var File_masstasker_proto protoreflect.FileDescriptor
var MassTasker_ServiceDesc = grpc.ServiceDesc{ ServiceName: "masstasker.MassTasker", HandlerType: (*MassTaskerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Update", Handler: _MassTasker_Update_Handler, }, { MethodName: "Query", Handler: _MassTasker_Query_Handler, }, { MethodName: "BulkSet", Handler: _MassTasker_BulkSet_Handler, }, { MethodName: "Debug", Handler: _MassTasker_Debug_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "masstasker.proto", }
MassTasker_ServiceDesc is the grpc.ServiceDesc for MassTasker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMassTaskerServer ¶
func RegisterMassTaskerServer(s grpc.ServiceRegistrar, srv MassTaskerServer)
Types ¶
type BulkSetRequest ¶ added in v0.1.9
type BulkSetRequest struct { // select which tasks we want to "update" Ref []*TaskRef `protobuf:"bytes,1,rep,name=ref,proto3" json:"ref,omitempty"` // and copy non-zero fields in the prototype into each matching object Prototype *Task `protobuf:"bytes,2,opt,name=prototype,proto3" json:"prototype,omitempty"` // contains filtered or unexported fields }
func (*BulkSetRequest) Descriptor
deprecated
added in
v0.1.9
func (*BulkSetRequest) Descriptor() ([]byte, []int)
Deprecated: Use BulkSetRequest.ProtoReflect.Descriptor instead.
func (*BulkSetRequest) GetPrototype ¶ added in v0.1.9
func (x *BulkSetRequest) GetPrototype() *Task
func (*BulkSetRequest) GetRef ¶ added in v0.1.9
func (x *BulkSetRequest) GetRef() []*TaskRef
func (*BulkSetRequest) ProtoMessage ¶ added in v0.1.9
func (*BulkSetRequest) ProtoMessage()
func (*BulkSetRequest) ProtoReflect ¶ added in v0.1.9
func (x *BulkSetRequest) ProtoReflect() protoreflect.Message
func (*BulkSetRequest) Reset ¶ added in v0.1.9
func (x *BulkSetRequest) Reset()
func (*BulkSetRequest) String ¶ added in v0.1.9
func (x *BulkSetRequest) String() string
type BulkSetResponse ¶ added in v0.1.9
type BulkSetResponse struct { NumUpdated uint64 `protobuf:"varint,1,opt,name=num_updated,json=numUpdated,proto3" json:"num_updated,omitempty"` // contains filtered or unexported fields }
func (*BulkSetResponse) Descriptor
deprecated
added in
v0.1.9
func (*BulkSetResponse) Descriptor() ([]byte, []int)
Deprecated: Use BulkSetResponse.ProtoReflect.Descriptor instead.
func (*BulkSetResponse) GetNumUpdated ¶ added in v0.1.9
func (x *BulkSetResponse) GetNumUpdated() uint64
func (*BulkSetResponse) ProtoMessage ¶ added in v0.1.9
func (*BulkSetResponse) ProtoMessage()
func (*BulkSetResponse) ProtoReflect ¶ added in v0.1.9
func (x *BulkSetResponse) ProtoReflect() protoreflect.Message
func (*BulkSetResponse) Reset ¶ added in v0.1.9
func (x *BulkSetResponse) Reset()
func (*BulkSetResponse) String ¶ added in v0.1.9
func (x *BulkSetResponse) String() string
type DebugRequest ¶
type DebugRequest struct { Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*DebugRequest) Descriptor
deprecated
func (*DebugRequest) Descriptor() ([]byte, []int)
Deprecated: Use DebugRequest.ProtoReflect.Descriptor instead.
func (*DebugRequest) GetGroup ¶ added in v0.1.8
func (x *DebugRequest) GetGroup() string
func (*DebugRequest) GetLimit ¶ added in v0.1.8
func (x *DebugRequest) GetLimit() uint64
func (*DebugRequest) ProtoMessage ¶
func (*DebugRequest) ProtoMessage()
func (*DebugRequest) ProtoReflect ¶
func (x *DebugRequest) ProtoReflect() protoreflect.Message
func (*DebugRequest) Reset ¶
func (x *DebugRequest) Reset()
func (*DebugRequest) String ¶
func (x *DebugRequest) String() string
type DebugResponse ¶
type DebugResponse struct { Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` NumTasks uint64 `protobuf:"varint,2,opt,name=num_tasks,json=numTasks,proto3" json:"num_tasks,omitempty"` // contains filtered or unexported fields }
func (*DebugResponse) Descriptor
deprecated
func (*DebugResponse) Descriptor() ([]byte, []int)
Deprecated: Use DebugResponse.ProtoReflect.Descriptor instead.
func (*DebugResponse) GetNumTasks ¶ added in v0.1.9
func (x *DebugResponse) GetNumTasks() uint64
func (*DebugResponse) GetTasks ¶
func (x *DebugResponse) GetTasks() []*Task
func (*DebugResponse) ProtoMessage ¶
func (*DebugResponse) ProtoMessage()
func (*DebugResponse) ProtoReflect ¶
func (x *DebugResponse) ProtoReflect() protoreflect.Message
func (*DebugResponse) Reset ¶
func (x *DebugResponse) Reset()
func (*DebugResponse) String ¶
func (x *DebugResponse) String() string
type LabelSelector ¶
type LabelSelector struct { Labels map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*LabelSelector) Descriptor
deprecated
func (*LabelSelector) Descriptor() ([]byte, []int)
Deprecated: Use LabelSelector.ProtoReflect.Descriptor instead.
func (*LabelSelector) GetLabels ¶
func (x *LabelSelector) GetLabels() map[string]string
func (*LabelSelector) ProtoMessage ¶
func (*LabelSelector) ProtoMessage()
func (*LabelSelector) ProtoReflect ¶
func (x *LabelSelector) ProtoReflect() protoreflect.Message
func (*LabelSelector) Reset ¶
func (x *LabelSelector) Reset()
func (*LabelSelector) String ¶
func (x *LabelSelector) String() string
type MassTaskerClient ¶
type MassTaskerClient interface { Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) BulkSet(ctx context.Context, in *BulkSetRequest, opts ...grpc.CallOption) (*BulkSetResponse, error) Debug(ctx context.Context, in *DebugRequest, opts ...grpc.CallOption) (*DebugResponse, error) }
MassTaskerClient is the client API for MassTasker 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 NewMassTaskerClient ¶
func NewMassTaskerClient(cc grpc.ClientConnInterface) MassTaskerClient
type MassTaskerServer ¶
type MassTaskerServer interface { Update(context.Context, *UpdateRequest) (*UpdateResponse, error) Query(context.Context, *QueryRequest) (*QueryResponse, error) BulkSet(context.Context, *BulkSetRequest) (*BulkSetResponse, error) Debug(context.Context, *DebugRequest) (*DebugResponse, error) // contains filtered or unexported methods }
MassTaskerServer is the server API for MassTasker service. All implementations must embed UnimplementedMassTaskerServer for forward compatibility
type QueryRequest ¶
type QueryRequest struct { Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` Now *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=now,proto3" json:"now,omitempty"` OwnFor *durationpb.Duration `protobuf:"bytes,3,opt,name=own_for,json=ownFor,proto3" json:"own_for,omitempty"` Wait bool `protobuf:"varint,5,opt,name=wait,proto3" json:"wait,omitempty"` // contains filtered or unexported fields }
func (*QueryRequest) Descriptor
deprecated
func (*QueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) GetGroup ¶
func (x *QueryRequest) GetGroup() string
func (*QueryRequest) GetNow ¶
func (x *QueryRequest) GetNow() *timestamppb.Timestamp
func (*QueryRequest) GetOwnFor ¶
func (x *QueryRequest) GetOwnFor() *durationpb.Duration
func (*QueryRequest) GetWait ¶
func (x *QueryRequest) GetWait() bool
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) ProtoReflect ¶
func (x *QueryRequest) ProtoReflect() protoreflect.Message
func (*QueryRequest) Reset ¶
func (x *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (x *QueryRequest) String() string
type QueryResponse ¶
type QueryResponse struct { Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` // contains filtered or unexported fields }
func (*QueryResponse) Descriptor
deprecated
func (*QueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
func (*QueryResponse) GetTask ¶
func (x *QueryResponse) GetTask() *Task
func (*QueryResponse) ProtoMessage ¶
func (*QueryResponse) ProtoMessage()
func (*QueryResponse) ProtoReflect ¶
func (x *QueryResponse) ProtoReflect() protoreflect.Message
func (*QueryResponse) Reset ¶
func (x *QueryResponse) Reset()
func (*QueryResponse) String ¶
func (x *QueryResponse) String() string
type Task ¶
type Task struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` Labels map[string]string `` /* 153-byte string literal not displayed */ NotBefore *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=not_before,json=notBefore,proto3" json:"not_before,omitempty"` // optional error annotation, useful when moving tasks to an error queue. // If you need a more structured error please encode it in the payload. Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*Task) Descriptor
deprecated
func (*Task) GetNotBefore ¶
func (x *Task) GetNotBefore() *timestamppb.Timestamp
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type TaskRef ¶
type TaskRef struct { // Types that are assignable to Sel: // // *TaskRef_Id // *TaskRef_Selector // *TaskRef_Group Sel isTaskRef_Sel `protobuf_oneof:"sel"` // contains filtered or unexported fields }
func (*TaskRef) Descriptor
deprecated
func (*TaskRef) GetSelector ¶
func (x *TaskRef) GetSelector() *LabelSelector
func (*TaskRef) ProtoMessage ¶
func (*TaskRef) ProtoMessage()
func (*TaskRef) ProtoReflect ¶
func (x *TaskRef) ProtoReflect() protoreflect.Message
type TaskRef_Group ¶ added in v0.1.9
type TaskRef_Group struct {
Group string `protobuf:"bytes,3,opt,name=group,proto3,oneof"`
}
type TaskRef_Id ¶
type TaskRef_Id struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3,oneof"`
}
type TaskRef_Selector ¶
type TaskRef_Selector struct {
Selector *LabelSelector `protobuf:"bytes,2,opt,name=selector,proto3,oneof"`
}
type Test ¶
type Test struct { Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` // contains filtered or unexported fields }
func (*Test) Descriptor
deprecated
func (*Test) ProtoMessage ¶
func (*Test) ProtoMessage()
func (*Test) ProtoReflect ¶
func (x *Test) ProtoReflect() protoreflect.Message
type UnimplementedMassTaskerServer ¶
type UnimplementedMassTaskerServer struct { }
UnimplementedMassTaskerServer must be embedded to have forward compatible implementations.
func (UnimplementedMassTaskerServer) BulkSet ¶ added in v0.1.9
func (UnimplementedMassTaskerServer) BulkSet(context.Context, *BulkSetRequest) (*BulkSetResponse, error)
func (UnimplementedMassTaskerServer) Debug ¶
func (UnimplementedMassTaskerServer) Debug(context.Context, *DebugRequest) (*DebugResponse, error)
func (UnimplementedMassTaskerServer) Query ¶
func (UnimplementedMassTaskerServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
func (UnimplementedMassTaskerServer) Update ¶
func (UnimplementedMassTaskerServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnsafeMassTaskerServer ¶
type UnsafeMassTaskerServer interface {
// contains filtered or unexported methods
}
UnsafeMassTaskerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MassTaskerServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { Created []*Task `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"` Deleted []*TaskRef `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"` Predicates []uint64 `protobuf:"varint,3,rep,packed,name=predicates,proto3" json:"predicates,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetCreated ¶
func (x *UpdateRequest) GetCreated() []*Task
func (*UpdateRequest) GetDeleted ¶
func (x *UpdateRequest) GetDeleted() []*TaskRef
func (*UpdateRequest) GetPredicates ¶
func (x *UpdateRequest) GetPredicates() []uint64
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
type UpdateResponse ¶
type UpdateResponse struct { CreatedIds []uint64 `protobuf:"varint,1,rep,packed,name=created_ids,json=createdIds,proto3" json:"created_ids,omitempty"` // contains filtered or unexported fields }
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) GetCreatedIds ¶
func (x *UpdateResponse) GetCreatedIds() []uint64
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string