Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDeckardServer(s grpc.ServiceRegistrar, srv DeckardServer)
- type AckRequest
- func (*AckRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AckRequest) GetBreakpoint() string
- func (x *AckRequest) GetId() string
- func (x *AckRequest) GetLockMs() int64
- func (x *AckRequest) GetQueue() string
- func (x *AckRequest) GetReason() string
- func (x *AckRequest) GetRemoveMessage() bool
- func (x *AckRequest) GetScore() float64
- func (x *AckRequest) GetScoreSubtract() float64deprecated
- func (*AckRequest) ProtoMessage()
- func (x *AckRequest) ProtoReflect() protoreflect.Message
- func (x *AckRequest) Reset()
- func (x *AckRequest) String() string
- type AckResponse
- func (*AckResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AckResponse) GetRemovalResponse() *RemoveResponse
- func (x *AckResponse) GetSuccess() bool
- func (*AckResponse) ProtoMessage()
- func (x *AckResponse) ProtoReflect() protoreflect.Message
- func (x *AckResponse) Reset()
- func (x *AckResponse) String() string
- type AddMessage
- func (*AddMessage) Descriptor() ([]byte, []int)deprecated
- func (x *AddMessage) GetDescription() string
- func (x *AddMessage) GetId() string
- func (x *AddMessage) GetMetadata() map[string]string
- func (x *AddMessage) GetPayload() map[string]*any1.Any
- func (x *AddMessage) GetQueue() string
- func (x *AddMessage) GetScore() float64
- func (x *AddMessage) GetStringPayload() string
- func (x *AddMessage) GetTimeless() bool
- func (x *AddMessage) GetTtlMinutes() int64
- func (*AddMessage) ProtoMessage()
- func (x *AddMessage) ProtoReflect() protoreflect.Message
- func (x *AddMessage) Reset()
- func (x *AddMessage) String() string
- type AddRequest
- type AddResponse
- func (*AddResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AddResponse) GetCreatedCount() int64
- func (x *AddResponse) GetUpdatedCount() int64
- func (*AddResponse) ProtoMessage()
- func (x *AddResponse) ProtoReflect() protoreflect.Message
- func (x *AddResponse) Reset()
- func (x *AddResponse) String() string
- type CountRequest
- type CountResponse
- type DeckardClient
- type DeckardServer
- type EditQueueRequest
- func (*EditQueueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EditQueueRequest) GetConfiguration() *QueueConfiguration
- func (x *EditQueueRequest) GetQueue() string
- func (*EditQueueRequest) ProtoMessage()
- func (x *EditQueueRequest) ProtoReflect() protoreflect.Message
- func (x *EditQueueRequest) Reset()
- func (x *EditQueueRequest) String() string
- type EditQueueResponse
- func (*EditQueueResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EditQueueResponse) GetQueue() string
- func (x *EditQueueResponse) GetSuccess() bool
- func (*EditQueueResponse) ProtoMessage()
- func (x *EditQueueResponse) ProtoReflect() protoreflect.Message
- func (x *EditQueueResponse) Reset()
- func (x *EditQueueResponse) String() string
- type FlushRequest
- type FlushResponse
- type GetByIdRequest
- func (*GetByIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetByIdRequest) GetId() string
- func (x *GetByIdRequest) GetQueue() string
- func (*GetByIdRequest) ProtoMessage()
- func (x *GetByIdRequest) ProtoReflect() protoreflect.Message
- func (x *GetByIdRequest) Reset()
- func (x *GetByIdRequest) String() string
- type GetByIdResponse
- func (*GetByIdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetByIdResponse) GetFound() bool
- func (x *GetByIdResponse) GetHumanReadablePayload() map[string]string
- func (x *GetByIdResponse) GetMessage() *Message
- func (*GetByIdResponse) ProtoMessage()
- func (x *GetByIdResponse) ProtoReflect() protoreflect.Message
- func (x *GetByIdResponse) Reset()
- func (x *GetByIdResponse) String() string
- type GetQueueRequest
- type GetQueueResponse
- func (*GetQueueResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetQueueResponse) GetConfiguration() *QueueConfiguration
- func (x *GetQueueResponse) GetQueue() string
- func (*GetQueueResponse) ProtoMessage()
- func (x *GetQueueResponse) ProtoReflect() protoreflect.Message
- func (x *GetQueueResponse) Reset()
- func (x *GetQueueResponse) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetBreakpoint() string
- func (x *Message) GetDescription() string
- func (x *Message) GetId() string
- func (x *Message) GetMetadata() map[string]string
- func (x *Message) GetPayload() map[string]*any1.Any
- func (x *Message) GetQueue() string
- func (x *Message) GetScore() float64
- func (x *Message) GetStringPayload() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type PullRequest
- func (*PullRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PullRequest) GetAmount() int32
- func (x *PullRequest) GetMaxScore() float64
- func (x *PullRequest) GetMinScore() float64
- func (x *PullRequest) GetQueue() string
- func (x *PullRequest) GetScoreFilter() int64deprecated
- func (*PullRequest) ProtoMessage()
- func (x *PullRequest) ProtoReflect() protoreflect.Message
- func (x *PullRequest) Reset()
- func (x *PullRequest) String() string
- type PullResponse
- type QueueConfiguration
- func (*QueueConfiguration) Descriptor() ([]byte, []int)deprecated
- func (x *QueueConfiguration) GetMaxElements() int64
- func (*QueueConfiguration) ProtoMessage()
- func (x *QueueConfiguration) ProtoReflect() protoreflect.Message
- func (x *QueueConfiguration) Reset()
- func (x *QueueConfiguration) String() string
- type RemoveRequest
- func (*RemoveRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveRequest) GetIds() []string
- func (x *RemoveRequest) GetQueue() string
- func (*RemoveRequest) ProtoMessage()
- func (x *RemoveRequest) ProtoReflect() protoreflect.Message
- func (x *RemoveRequest) Reset()
- func (x *RemoveRequest) String() string
- type RemoveResponse
- func (*RemoveResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveResponse) GetCacheRemoved() int64
- func (x *RemoveResponse) GetStorageRemoved() int64
- func (*RemoveResponse) ProtoMessage()
- func (x *RemoveResponse) ProtoReflect() protoreflect.Message
- func (x *RemoveResponse) Reset()
- func (x *RemoveResponse) String() string
- type UnimplementedDeckardServer
- func (UnimplementedDeckardServer) Ack(context.Context, *AckRequest) (*AckResponse, error)
- func (UnimplementedDeckardServer) Add(context.Context, *AddRequest) (*AddResponse, error)
- func (UnimplementedDeckardServer) Count(context.Context, *CountRequest) (*CountResponse, error)
- func (UnimplementedDeckardServer) EditQueue(context.Context, *EditQueueRequest) (*EditQueueResponse, error)
- func (UnimplementedDeckardServer) Flush(context.Context, *FlushRequest) (*FlushResponse, error)
- func (UnimplementedDeckardServer) GetById(context.Context, *GetByIdRequest) (*GetByIdResponse, error)
- func (UnimplementedDeckardServer) GetQueue(context.Context, *GetQueueRequest) (*GetQueueResponse, error)
- func (UnimplementedDeckardServer) Nack(context.Context, *AckRequest) (*AckResponse, error)
- func (UnimplementedDeckardServer) Pull(context.Context, *PullRequest) (*PullResponse, error)
- func (UnimplementedDeckardServer) Remove(context.Context, *RemoveRequest) (*RemoveResponse, error)
- type UnsafeDeckardServer
Constants ¶
const ( Deckard_Add_FullMethodName = "/blipai.deckard.Deckard/Add" Deckard_Pull_FullMethodName = "/blipai.deckard.Deckard/Pull" Deckard_Ack_FullMethodName = "/blipai.deckard.Deckard/Ack" Deckard_Nack_FullMethodName = "/blipai.deckard.Deckard/Nack" Deckard_Count_FullMethodName = "/blipai.deckard.Deckard/Count" Deckard_Remove_FullMethodName = "/blipai.deckard.Deckard/Remove" Deckard_Flush_FullMethodName = "/blipai.deckard.Deckard/Flush" Deckard_GetById_FullMethodName = "/blipai.deckard.Deckard/GetById" Deckard_EditQueue_FullMethodName = "/blipai.deckard.Deckard/EditQueue" Deckard_GetQueue_FullMethodName = "/blipai.deckard.Deckard/GetQueue" )
Variables ¶
var Deckard_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blipai.deckard.Deckard", HandlerType: (*DeckardServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _Deckard_Add_Handler, }, { MethodName: "Pull", Handler: _Deckard_Pull_Handler, }, { MethodName: "Ack", Handler: _Deckard_Ack_Handler, }, { MethodName: "Nack", Handler: _Deckard_Nack_Handler, }, { MethodName: "Count", Handler: _Deckard_Count_Handler, }, { MethodName: "Remove", Handler: _Deckard_Remove_Handler, }, { MethodName: "Flush", Handler: _Deckard_Flush_Handler, }, { MethodName: "GetById", Handler: _Deckard_GetById_Handler, }, { MethodName: "EditQueue", Handler: _Deckard_EditQueue_Handler, }, { MethodName: "GetQueue", Handler: _Deckard_GetQueue_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "deckard_service.proto", }
Deckard_ServiceDesc is the grpc.ServiceDesc for Deckard service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_deckard_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDeckardServer ¶
func RegisterDeckardServer(s grpc.ServiceRegistrar, srv DeckardServer)
Types ¶
type AckRequest ¶
type AckRequest struct { // ID of the message Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Queue where this message is stored Queue string `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"` // Reason of this result. // // Useful for audit, mostly on 'nack' signals. Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` // This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field. // // The value to subtract the score and increase final message priority. // For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm. // If you want to penalize the message you can send a negative number. // // IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue. // // This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue). // It will be ignored if used at the same time of 'score' or 'lock_ms' fields. // // Deprecated: Marked as deprecated in deckard_service.proto. ScoreSubtract float64 `protobuf:"fixed64,3,opt,name=score_subtract,json=scoreSubtract,proto3" json:"score_subtract,omitempty"` // Breakpoint is a field to be used as an auxiliar field for some specific use cases. // For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. // // Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. // Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. Breakpoint string `protobuf:"bytes,4,opt,name=breakpoint,proto3" json:"breakpoint,omitempty"` // Time in milliseconds to lock a message before returning it to the queue. // For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field. // // For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field. // // IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds. // This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well. LockMs int64 `protobuf:"varint,6,opt,name=lock_ms,json=lockMs,proto3" json:"lock_ms,omitempty"` // Whether the message should be removed when acked/nacked RemoveMessage bool `protobuf:"varint,7,opt,name=removeMessage,proto3" json:"removeMessage,omitempty"` // Sets the score of the message when ACKed, to override the default score algorithm. // // If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score. // // For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds. // // For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0. // // Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request. // // REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped. Score float64 `protobuf:"fixed64,10,opt,name=score,proto3" json:"score,omitempty"` // contains filtered or unexported fields }
func (*AckRequest) Descriptor
deprecated
func (*AckRequest) Descriptor() ([]byte, []int)
Deprecated: Use AckRequest.ProtoReflect.Descriptor instead.
func (*AckRequest) GetBreakpoint ¶
func (x *AckRequest) GetBreakpoint() string
func (*AckRequest) GetId ¶
func (x *AckRequest) GetId() string
func (*AckRequest) GetLockMs ¶
func (x *AckRequest) GetLockMs() int64
func (*AckRequest) GetQueue ¶
func (x *AckRequest) GetQueue() string
func (*AckRequest) GetReason ¶
func (x *AckRequest) GetReason() string
func (*AckRequest) GetRemoveMessage ¶
func (x *AckRequest) GetRemoveMessage() bool
func (*AckRequest) GetScore ¶ added in v0.0.17
func (x *AckRequest) GetScore() float64
func (*AckRequest) GetScoreSubtract
deprecated
func (x *AckRequest) GetScoreSubtract() float64
Deprecated: Marked as deprecated in deckard_service.proto.
func (*AckRequest) ProtoMessage ¶
func (*AckRequest) ProtoMessage()
func (*AckRequest) ProtoReflect ¶
func (x *AckRequest) ProtoReflect() protoreflect.Message
func (*AckRequest) Reset ¶
func (x *AckRequest) Reset()
func (*AckRequest) String ¶
func (x *AckRequest) String() string
type AckResponse ¶
type AckResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // The removal response if the message's removal was requested RemovalResponse *RemoveResponse `protobuf:"bytes,2,opt,name=removal_response,json=removalResponse,proto3" json:"removal_response,omitempty"` // contains filtered or unexported fields }
func (*AckResponse) Descriptor
deprecated
func (*AckResponse) Descriptor() ([]byte, []int)
Deprecated: Use AckResponse.ProtoReflect.Descriptor instead.
func (*AckResponse) GetRemovalResponse ¶
func (x *AckResponse) GetRemovalResponse() *RemoveResponse
func (*AckResponse) GetSuccess ¶
func (x *AckResponse) GetSuccess() bool
func (*AckResponse) ProtoMessage ¶
func (*AckResponse) ProtoMessage()
func (*AckResponse) ProtoReflect ¶
func (x *AckResponse) ProtoReflect() protoreflect.Message
func (*AckResponse) Reset ¶
func (x *AckResponse) Reset()
func (*AckResponse) String ¶
func (x *AckResponse) String() string
type AddMessage ¶
type AddMessage struct { // Unique id of this message Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // A payload map with formatted data to be stored and used by clients. Payload map[string]*any1.Any `` /* 156-byte string literal not displayed */ // Non-formatted string payload. // This field can be used to store simple string data instead of using the payload field. StringPayload string `protobuf:"bytes,3,opt,name=string_payload,json=stringPayload,proto3" json:"string_payload,omitempty"` // Metadata is a map of string to be used as a key-value store. // It is a simple way to store data that is not part of the message payload. Metadata map[string]string `` /* 158-byte string literal not displayed */ // Name of the queue to add this message // // Suggestion: to better observability, provide the name of the application using colon as the separator. Example: <application_name>:<queue_name> // // You may also add a queue prefix to the queue name using two colons as the separator. Example: <application_name>:<queue_prefix>::<queue_name> Queue string `protobuf:"bytes,4,opt,name=queue,proto3" json:"queue,omitempty"` // Indicate this message will never expire and will only be deleted from the queue if explicitly removed. Timeless bool `protobuf:"varint,6,opt,name=timeless,proto3" json:"timeless,omitempty"` // TTL is the amount of time in minutes this message will live in the queue. // TTL is not a exact time, the message may live a little longer than the specified TTL. TtlMinutes int64 `protobuf:"varint,7,opt,name=ttl_minutes,json=ttlMinutes,proto3" json:"ttl_minutes,omitempty"` // Description of the message, this should be used as a human readable string to be used in diagnostics. Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` // Score represents the priority score the message currently have in the queue. // The score is used to determine the order of the messages returned in a pull request. // The lower the score, the higher the priority. // // If the score is not set (or set to 0), the score will be set with the current timestamp in milliseconds at the moment of the message creation. // // The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 // Negative scores will be converted to 0, adding the message with the lowest score (and highest priority) Score float64 `protobuf:"fixed64,12,opt,name=score,proto3" json:"score,omitempty"` // contains filtered or unexported fields }
func (*AddMessage) Descriptor
deprecated
func (*AddMessage) Descriptor() ([]byte, []int)
Deprecated: Use AddMessage.ProtoReflect.Descriptor instead.
func (*AddMessage) GetDescription ¶
func (x *AddMessage) GetDescription() string
func (*AddMessage) GetId ¶
func (x *AddMessage) GetId() string
func (*AddMessage) GetMetadata ¶
func (x *AddMessage) GetMetadata() map[string]string
func (*AddMessage) GetPayload ¶
func (x *AddMessage) GetPayload() map[string]*any1.Any
func (*AddMessage) GetQueue ¶
func (x *AddMessage) GetQueue() string
func (*AddMessage) GetScore ¶ added in v0.0.17
func (x *AddMessage) GetScore() float64
func (*AddMessage) GetStringPayload ¶
func (x *AddMessage) GetStringPayload() string
func (*AddMessage) GetTimeless ¶
func (x *AddMessage) GetTimeless() bool
func (*AddMessage) GetTtlMinutes ¶
func (x *AddMessage) GetTtlMinutes() int64
func (*AddMessage) ProtoMessage ¶
func (*AddMessage) ProtoMessage()
func (*AddMessage) ProtoReflect ¶
func (x *AddMessage) ProtoReflect() protoreflect.Message
func (*AddMessage) Reset ¶
func (x *AddMessage) Reset()
func (*AddMessage) String ¶
func (x *AddMessage) String() string
type AddRequest ¶
type AddRequest struct { // List of messages to be added Messages []*AddMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*AddRequest) Descriptor
deprecated
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetMessages ¶
func (x *AddRequest) GetMessages() []*AddMessage
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶
func (x *AddRequest) Reset()
func (*AddRequest) String ¶
func (x *AddRequest) String() string
type AddResponse ¶
type AddResponse struct { // Number of created messages CreatedCount int64 `protobuf:"varint,1,opt,name=created_count,json=createdCount,proto3" json:"created_count,omitempty"` // Number of updated messages UpdatedCount int64 `protobuf:"varint,2,opt,name=updated_count,json=updatedCount,proto3" json:"updated_count,omitempty"` // contains filtered or unexported fields }
func (*AddResponse) Descriptor
deprecated
func (*AddResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
func (*AddResponse) GetCreatedCount ¶
func (x *AddResponse) GetCreatedCount() int64
func (*AddResponse) GetUpdatedCount ¶
func (x *AddResponse) GetUpdatedCount() int64
func (*AddResponse) ProtoMessage ¶
func (*AddResponse) ProtoMessage()
func (*AddResponse) ProtoReflect ¶
func (x *AddResponse) ProtoReflect() protoreflect.Message
func (*AddResponse) Reset ¶
func (x *AddResponse) Reset()
func (*AddResponse) String ¶
func (x *AddResponse) String() string
type CountRequest ¶
type CountRequest struct { Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` // contains filtered or unexported fields }
func (*CountRequest) Descriptor
deprecated
func (*CountRequest) Descriptor() ([]byte, []int)
Deprecated: Use CountRequest.ProtoReflect.Descriptor instead.
func (*CountRequest) GetQueue ¶
func (x *CountRequest) GetQueue() string
func (*CountRequest) ProtoMessage ¶
func (*CountRequest) ProtoMessage()
func (*CountRequest) ProtoReflect ¶
func (x *CountRequest) ProtoReflect() protoreflect.Message
func (*CountRequest) Reset ¶
func (x *CountRequest) Reset()
func (*CountRequest) String ¶
func (x *CountRequest) String() string
type CountResponse ¶
type CountResponse struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*CountResponse) Descriptor
deprecated
func (*CountResponse) Descriptor() ([]byte, []int)
Deprecated: Use CountResponse.ProtoReflect.Descriptor instead.
func (*CountResponse) GetCount ¶
func (x *CountResponse) GetCount() int64
func (*CountResponse) ProtoMessage ¶
func (*CountResponse) ProtoMessage()
func (*CountResponse) ProtoReflect ¶
func (x *CountResponse) ProtoReflect() protoreflect.Message
func (*CountResponse) Reset ¶
func (x *CountResponse) Reset()
func (*CountResponse) String ¶
func (x *CountResponse) String() string
type DeckardClient ¶
type DeckardClient interface { // Adds messages to the queue. If any message already exists (same id and queue) it will be updated Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) // Pulls messages from the queue Pull(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*PullResponse, error) // Acks a message, marking it as successfully processed Ack(ctx context.Context, in *AckRequest, opts ...grpc.CallOption) (*AckResponse, error) // Nacks a message, marking it as not processed Nack(ctx context.Context, in *AckRequest, opts ...grpc.CallOption) (*AckResponse, error) // Counts number of messages on queue based on a filter request Count(ctx context.Context, in *CountRequest, opts ...grpc.CallOption) (*CountResponse, error) // Removes one or many messages from the queue based on its ids Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error) // Discards all deckard data from storage and cache. // This request is only available if deckard instance is configured with MEMORY cache and storage. Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*FlushResponse, error) // Gets a message from a specific queue using its id // CAUTION: this should be used mainly for diagnostics and debugging purposes since it will be direct operation on the storage system GetById(ctx context.Context, in *GetByIdRequest, opts ...grpc.CallOption) (*GetByIdResponse, error) // Edits a queue configuration EditQueue(ctx context.Context, in *EditQueueRequest, opts ...grpc.CallOption) (*EditQueueResponse, error) // Gets the current configuration for a queue GetQueue(ctx context.Context, in *GetQueueRequest, opts ...grpc.CallOption) (*GetQueueResponse, error) }
DeckardClient is the client API for Deckard 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 NewDeckardClient ¶
func NewDeckardClient(cc grpc.ClientConnInterface) DeckardClient
type DeckardServer ¶
type DeckardServer interface { // Adds messages to the queue. If any message already exists (same id and queue) it will be updated Add(context.Context, *AddRequest) (*AddResponse, error) // Pulls messages from the queue Pull(context.Context, *PullRequest) (*PullResponse, error) // Acks a message, marking it as successfully processed Ack(context.Context, *AckRequest) (*AckResponse, error) // Nacks a message, marking it as not processed Nack(context.Context, *AckRequest) (*AckResponse, error) // Counts number of messages on queue based on a filter request Count(context.Context, *CountRequest) (*CountResponse, error) // Removes one or many messages from the queue based on its ids Remove(context.Context, *RemoveRequest) (*RemoveResponse, error) // Discards all deckard data from storage and cache. // This request is only available if deckard instance is configured with MEMORY cache and storage. Flush(context.Context, *FlushRequest) (*FlushResponse, error) // Gets a message from a specific queue using its id // CAUTION: this should be used mainly for diagnostics and debugging purposes since it will be direct operation on the storage system GetById(context.Context, *GetByIdRequest) (*GetByIdResponse, error) // Edits a queue configuration EditQueue(context.Context, *EditQueueRequest) (*EditQueueResponse, error) // Gets the current configuration for a queue GetQueue(context.Context, *GetQueueRequest) (*GetQueueResponse, error) // contains filtered or unexported methods }
DeckardServer is the server API for Deckard service. All implementations must embed UnimplementedDeckardServer for forward compatibility
type EditQueueRequest ¶
type EditQueueRequest struct { // Name of the queue to be updated // This includes all prefixes and suffixes Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` // Configuration to apply to the queue. It will always update the queue with the newer configuration. // Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. // If you want to change a configuration to its default value, manually set it to its default value following each field documentation. Configuration *QueueConfiguration `protobuf:"bytes,2,opt,name=configuration,proto3" json:"configuration,omitempty"` // contains filtered or unexported fields }
func (*EditQueueRequest) Descriptor
deprecated
func (*EditQueueRequest) Descriptor() ([]byte, []int)
Deprecated: Use EditQueueRequest.ProtoReflect.Descriptor instead.
func (*EditQueueRequest) GetConfiguration ¶
func (x *EditQueueRequest) GetConfiguration() *QueueConfiguration
func (*EditQueueRequest) GetQueue ¶
func (x *EditQueueRequest) GetQueue() string
func (*EditQueueRequest) ProtoMessage ¶
func (*EditQueueRequest) ProtoMessage()
func (*EditQueueRequest) ProtoReflect ¶
func (x *EditQueueRequest) ProtoReflect() protoreflect.Message
func (*EditQueueRequest) Reset ¶
func (x *EditQueueRequest) Reset()
func (*EditQueueRequest) String ¶
func (x *EditQueueRequest) String() string
type EditQueueResponse ¶
type EditQueueResponse struct { // Name of the queue Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*EditQueueResponse) Descriptor
deprecated
func (*EditQueueResponse) Descriptor() ([]byte, []int)
Deprecated: Use EditQueueResponse.ProtoReflect.Descriptor instead.
func (*EditQueueResponse) GetQueue ¶
func (x *EditQueueResponse) GetQueue() string
func (*EditQueueResponse) GetSuccess ¶
func (x *EditQueueResponse) GetSuccess() bool
func (*EditQueueResponse) ProtoMessage ¶
func (*EditQueueResponse) ProtoMessage()
func (*EditQueueResponse) ProtoReflect ¶
func (x *EditQueueResponse) ProtoReflect() protoreflect.Message
func (*EditQueueResponse) Reset ¶
func (x *EditQueueResponse) Reset()
func (*EditQueueResponse) String ¶
func (x *EditQueueResponse) String() string
type FlushRequest ¶
type FlushRequest struct {
// contains filtered or unexported fields
}
func (*FlushRequest) Descriptor
deprecated
func (*FlushRequest) Descriptor() ([]byte, []int)
Deprecated: Use FlushRequest.ProtoReflect.Descriptor instead.
func (*FlushRequest) ProtoMessage ¶
func (*FlushRequest) ProtoMessage()
func (*FlushRequest) ProtoReflect ¶
func (x *FlushRequest) ProtoReflect() protoreflect.Message
func (*FlushRequest) Reset ¶
func (x *FlushRequest) Reset()
func (*FlushRequest) String ¶
func (x *FlushRequest) String() string
type FlushResponse ¶
type FlushResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*FlushResponse) Descriptor
deprecated
func (*FlushResponse) Descriptor() ([]byte, []int)
Deprecated: Use FlushResponse.ProtoReflect.Descriptor instead.
func (*FlushResponse) GetSuccess ¶
func (x *FlushResponse) GetSuccess() bool
func (*FlushResponse) ProtoMessage ¶
func (*FlushResponse) ProtoMessage()
func (*FlushResponse) ProtoReflect ¶
func (x *FlushResponse) ProtoReflect() protoreflect.Message
func (*FlushResponse) Reset ¶
func (x *FlushResponse) Reset()
func (*FlushResponse) String ¶
func (x *FlushResponse) String() string
type GetByIdRequest ¶
type GetByIdRequest struct { // Name of the queue to get a message Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` // The message id Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetByIdRequest) Descriptor
deprecated
func (*GetByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByIdRequest.ProtoReflect.Descriptor instead.
func (*GetByIdRequest) GetId ¶
func (x *GetByIdRequest) GetId() string
func (*GetByIdRequest) GetQueue ¶
func (x *GetByIdRequest) GetQueue() string
func (*GetByIdRequest) ProtoMessage ¶
func (*GetByIdRequest) ProtoMessage()
func (*GetByIdRequest) ProtoReflect ¶
func (x *GetByIdRequest) ProtoReflect() protoreflect.Message
func (*GetByIdRequest) Reset ¶
func (x *GetByIdRequest) Reset()
func (*GetByIdRequest) String ¶
func (x *GetByIdRequest) String() string
type GetByIdResponse ¶
type GetByIdResponse struct { Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // A human readable string data map when the message is found // This represents the payload map as a JSON string representation // This is useful for debugging and diagnostics HumanReadablePayload map[string]string `` /* 211-byte string literal not displayed */ Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` // contains filtered or unexported fields }
func (*GetByIdResponse) Descriptor
deprecated
func (*GetByIdResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetByIdResponse.ProtoReflect.Descriptor instead.
func (*GetByIdResponse) GetFound ¶
func (x *GetByIdResponse) GetFound() bool
func (*GetByIdResponse) GetHumanReadablePayload ¶
func (x *GetByIdResponse) GetHumanReadablePayload() map[string]string
func (*GetByIdResponse) GetMessage ¶
func (x *GetByIdResponse) GetMessage() *Message
func (*GetByIdResponse) ProtoMessage ¶
func (*GetByIdResponse) ProtoMessage()
func (*GetByIdResponse) ProtoReflect ¶
func (x *GetByIdResponse) ProtoReflect() protoreflect.Message
func (*GetByIdResponse) Reset ¶
func (x *GetByIdResponse) Reset()
func (*GetByIdResponse) String ¶
func (x *GetByIdResponse) String() string
type GetQueueRequest ¶
type GetQueueRequest struct { // Name of the queue to be updated // This includes all prefixes and suffixes Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` // contains filtered or unexported fields }
func (*GetQueueRequest) Descriptor
deprecated
func (*GetQueueRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetQueueRequest.ProtoReflect.Descriptor instead.
func (*GetQueueRequest) GetQueue ¶
func (x *GetQueueRequest) GetQueue() string
func (*GetQueueRequest) ProtoMessage ¶
func (*GetQueueRequest) ProtoMessage()
func (*GetQueueRequest) ProtoReflect ¶
func (x *GetQueueRequest) ProtoReflect() protoreflect.Message
func (*GetQueueRequest) Reset ¶
func (x *GetQueueRequest) Reset()
func (*GetQueueRequest) String ¶
func (x *GetQueueRequest) String() string
type GetQueueResponse ¶
type GetQueueResponse struct { // Name of the queue Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` // Configuration of the queue Configuration *QueueConfiguration `protobuf:"bytes,2,opt,name=configuration,proto3" json:"configuration,omitempty"` // contains filtered or unexported fields }
func (*GetQueueResponse) Descriptor
deprecated
func (*GetQueueResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetQueueResponse.ProtoReflect.Descriptor instead.
func (*GetQueueResponse) GetConfiguration ¶
func (x *GetQueueResponse) GetConfiguration() *QueueConfiguration
func (*GetQueueResponse) GetQueue ¶
func (x *GetQueueResponse) GetQueue() string
func (*GetQueueResponse) ProtoMessage ¶
func (*GetQueueResponse) ProtoMessage()
func (*GetQueueResponse) ProtoReflect ¶
func (x *GetQueueResponse) ProtoReflect() protoreflect.Message
func (*GetQueueResponse) Reset ¶
func (x *GetQueueResponse) Reset()
func (*GetQueueResponse) String ¶
func (x *GetQueueResponse) String() string
type Message ¶
type Message struct { // ID is an unique identifier inside a queue. // Any message with the same id and queue will be considered the same message. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Description of the message, this should be used as a human readable string to be used in diagnostics. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // Full name of the queue this message belongs (including any prefixes) Queue string `protobuf:"bytes,3,opt,name=queue,proto3" json:"queue,omitempty"` // A payload map with formatted data to be stored and used by clients. Payload map[string]*any1.Any `` /* 155-byte string literal not displayed */ // Metadata is a map of string to be used as a key-value store. // It is a simple way to store data that is not part of the message payload. Metadata map[string]string `` /* 157-byte string literal not displayed */ // Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. // This field can be used to store simple string data instead of using the payload field. StringPayload string `protobuf:"bytes,5,opt,name=string_payload,json=stringPayload,proto3" json:"string_payload,omitempty"` // Score represents the priority score the message currently have in the queue. // The lower the score, the higher the priority. // The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 Score float64 `protobuf:"fixed64,6,opt,name=score,proto3" json:"score,omitempty"` // Breakpoint is a field to be used as an auxiliar field for some specific use cases. // For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. // // Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. // Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. Breakpoint string `protobuf:"bytes,7,opt,name=breakpoint,proto3" json:"breakpoint,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetBreakpoint ¶
func (*Message) GetDescription ¶
func (*Message) GetMetadata ¶
func (*Message) GetStringPayload ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type PullRequest ¶
type PullRequest struct { // Full name of the queue to pull messages (including any prefixes) Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` // Number of messages to fetch. // Caution: as greater the amount, as more time it will take to process the request. // Max value is 1000 and the default value is 1 Amount int32 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` // Prefer using the max_score field instead of this one. // This field is deprecated and will be removed in the future. // // The `score_filter` behaves differently than `max_score` field. // The `max_score` field is the upper threshold itself, but the `score_filter` will result in a upper score threshold of the current timestamp minus the score_filter value. // // Useful only when your queue's score is only based on the current timestamp to not return a message just moments after it was last used. // It will only return messages with score lower than the current timestamp minus the score_filter value. // // For example if your queue's score is only based on the current timestamp, this parameter will be the number of milliseconds a message must be in the queue before being returned. // // Deprecated: Marked as deprecated in deckard_service.proto. ScoreFilter int64 `protobuf:"varint,3,opt,name=score_filter,json=scoreFilter,proto3" json:"score_filter,omitempty"` // Sets the upper threshold for the priority score of a message to be returned in the pull request. // // Only messages with a priority score equal to or lower than the max_score value will be returned. // // The maximum score accepted by Deckard is 9007199254740992, any value higher than this will be capped to the maximum score. // To set this value to the minimum score accepted by Deckard, use any negative number. // This parameter will be ignored if set to 0 (default value). MaxScore float64 `protobuf:"fixed64,4,opt,name=max_score,json=maxScore,proto3" json:"max_score,omitempty"` // Sets the lower threshold for the priority score required for a message to be returned. // Only messages with a priority score equal to or higher than the min_score value will be returned. // The minimum score accepted by Deckard is 0 which is also the default value MinScore float64 `protobuf:"fixed64,5,opt,name=min_score,json=minScore,proto3" json:"min_score,omitempty"` // contains filtered or unexported fields }
func (*PullRequest) Descriptor
deprecated
func (*PullRequest) Descriptor() ([]byte, []int)
Deprecated: Use PullRequest.ProtoReflect.Descriptor instead.
func (*PullRequest) GetAmount ¶
func (x *PullRequest) GetAmount() int32
func (*PullRequest) GetMaxScore ¶ added in v0.0.17
func (x *PullRequest) GetMaxScore() float64
func (*PullRequest) GetMinScore ¶ added in v0.0.17
func (x *PullRequest) GetMinScore() float64
func (*PullRequest) GetQueue ¶
func (x *PullRequest) GetQueue() string
func (*PullRequest) GetScoreFilter
deprecated
func (x *PullRequest) GetScoreFilter() int64
Deprecated: Marked as deprecated in deckard_service.proto.
func (*PullRequest) ProtoMessage ¶
func (*PullRequest) ProtoMessage()
func (*PullRequest) ProtoReflect ¶
func (x *PullRequest) ProtoReflect() protoreflect.Message
func (*PullRequest) Reset ¶
func (x *PullRequest) Reset()
func (*PullRequest) String ¶
func (x *PullRequest) String() string
type PullResponse ¶
type PullResponse struct { // List of returned messages Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*PullResponse) Descriptor
deprecated
func (*PullResponse) Descriptor() ([]byte, []int)
Deprecated: Use PullResponse.ProtoReflect.Descriptor instead.
func (*PullResponse) GetMessages ¶
func (x *PullResponse) GetMessages() []*Message
func (*PullResponse) ProtoMessage ¶
func (*PullResponse) ProtoMessage()
func (*PullResponse) ProtoReflect ¶
func (x *PullResponse) ProtoReflect() protoreflect.Message
func (*PullResponse) Reset ¶
func (x *PullResponse) Reset()
func (*PullResponse) String ¶
func (x *PullResponse) String() string
type QueueConfiguration ¶
type QueueConfiguration struct { // Number of max elements the queue can have. // // To apply a max elements to a queue, set a value greater than 0. // To remove the max elements from a queue, set the value to -1. // 0 will be always ignored and the queue will not be updated. // // All queues are unlimited by default. MaxElements int64 `protobuf:"varint,1,opt,name=max_elements,json=maxElements,proto3" json:"max_elements,omitempty"` // contains filtered or unexported fields }
The queue configuration does not change instantly and can take up to 10 minutes to complete update.
func (*QueueConfiguration) Descriptor
deprecated
func (*QueueConfiguration) Descriptor() ([]byte, []int)
Deprecated: Use QueueConfiguration.ProtoReflect.Descriptor instead.
func (*QueueConfiguration) GetMaxElements ¶
func (x *QueueConfiguration) GetMaxElements() int64
func (*QueueConfiguration) ProtoMessage ¶
func (*QueueConfiguration) ProtoMessage()
func (*QueueConfiguration) ProtoReflect ¶
func (x *QueueConfiguration) ProtoReflect() protoreflect.Message
func (*QueueConfiguration) Reset ¶
func (x *QueueConfiguration) Reset()
func (*QueueConfiguration) String ¶
func (x *QueueConfiguration) String() string
type RemoveRequest ¶
type RemoveRequest struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // Name of the queue to remove message // Provide the name of the application as a prefix using colon as the separator. Example: <application_name>:<queue_name> Queue string `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"` // contains filtered or unexported fields }
func (*RemoveRequest) Descriptor
deprecated
func (*RemoveRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveRequest.ProtoReflect.Descriptor instead.
func (*RemoveRequest) GetIds ¶
func (x *RemoveRequest) GetIds() []string
func (*RemoveRequest) GetQueue ¶
func (x *RemoveRequest) GetQueue() string
func (*RemoveRequest) ProtoMessage ¶
func (*RemoveRequest) ProtoMessage()
func (*RemoveRequest) ProtoReflect ¶
func (x *RemoveRequest) ProtoReflect() protoreflect.Message
func (*RemoveRequest) Reset ¶
func (x *RemoveRequest) Reset()
func (*RemoveRequest) String ¶
func (x *RemoveRequest) String() string
type RemoveResponse ¶
type RemoveResponse struct { CacheRemoved int64 `protobuf:"varint,1,opt,name=cacheRemoved,proto3" json:"cacheRemoved,omitempty"` StorageRemoved int64 `protobuf:"varint,2,opt,name=storageRemoved,proto3" json:"storageRemoved,omitempty"` // contains filtered or unexported fields }
func (*RemoveResponse) Descriptor
deprecated
func (*RemoveResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoveResponse.ProtoReflect.Descriptor instead.
func (*RemoveResponse) GetCacheRemoved ¶
func (x *RemoveResponse) GetCacheRemoved() int64
func (*RemoveResponse) GetStorageRemoved ¶
func (x *RemoveResponse) GetStorageRemoved() int64
func (*RemoveResponse) ProtoMessage ¶
func (*RemoveResponse) ProtoMessage()
func (*RemoveResponse) ProtoReflect ¶
func (x *RemoveResponse) ProtoReflect() protoreflect.Message
func (*RemoveResponse) Reset ¶
func (x *RemoveResponse) Reset()
func (*RemoveResponse) String ¶
func (x *RemoveResponse) String() string
type UnimplementedDeckardServer ¶
type UnimplementedDeckardServer struct { }
UnimplementedDeckardServer must be embedded to have forward compatible implementations.
func (UnimplementedDeckardServer) Ack ¶
func (UnimplementedDeckardServer) Ack(context.Context, *AckRequest) (*AckResponse, error)
func (UnimplementedDeckardServer) Add ¶
func (UnimplementedDeckardServer) Add(context.Context, *AddRequest) (*AddResponse, error)
func (UnimplementedDeckardServer) Count ¶
func (UnimplementedDeckardServer) Count(context.Context, *CountRequest) (*CountResponse, error)
func (UnimplementedDeckardServer) EditQueue ¶
func (UnimplementedDeckardServer) EditQueue(context.Context, *EditQueueRequest) (*EditQueueResponse, error)
func (UnimplementedDeckardServer) Flush ¶
func (UnimplementedDeckardServer) Flush(context.Context, *FlushRequest) (*FlushResponse, error)
func (UnimplementedDeckardServer) GetById ¶
func (UnimplementedDeckardServer) GetById(context.Context, *GetByIdRequest) (*GetByIdResponse, error)
func (UnimplementedDeckardServer) GetQueue ¶
func (UnimplementedDeckardServer) GetQueue(context.Context, *GetQueueRequest) (*GetQueueResponse, error)
func (UnimplementedDeckardServer) Nack ¶
func (UnimplementedDeckardServer) Nack(context.Context, *AckRequest) (*AckResponse, error)
func (UnimplementedDeckardServer) Pull ¶
func (UnimplementedDeckardServer) Pull(context.Context, *PullRequest) (*PullResponse, error)
func (UnimplementedDeckardServer) Remove ¶
func (UnimplementedDeckardServer) Remove(context.Context, *RemoveRequest) (*RemoveResponse, error)
type UnsafeDeckardServer ¶
type UnsafeDeckardServer interface {
// contains filtered or unexported methods
}
UnsafeDeckardServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DeckardServer will result in compilation errors.