Documentation ¶
Index ¶
Constants ¶
View Source
const (
UserAgent = "go-sharq"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreClient ¶
type CoreClient struct {
// contains filtered or unexported fields
}
func NewCoreClient ¶
func NewCoreClient(config CoreClientConfig) *CoreClient
func (*CoreClient) BulkEnqueue ¶
func (c *CoreClient) BulkEnqueue(e []EnqueueRequest) []EnqueueResponse
func (*CoreClient) Dequeue ¶
func (c *CoreClient) Dequeue(queueType string) (*DequeueResponse, error)
func (*CoreClient) Enqueue ¶
func (c *CoreClient) Enqueue(e *EnqueueRequest) EnqueueResponse
func (*CoreClient) Finish ¶
func (c *CoreClient) Finish(queueType, queueID, jobID string) error
type CoreClientConfig ¶
type CoreClientConfig struct { JobExpireInterval int JobRequeueInterval int DefaultJobRequeueLimit int RedisOptions *redis.UniversalOptions KeyPrefix string RunRequeue bool }
func NewCoreClientConfig ¶
func NewCoreClientConfig() CoreClientConfig
Returns a config object with default values set
type DequeueResponse ¶
type EnqueueRequest ¶
type EnqueueRequest struct { JobID string `json:"job_id"` Interval int `json:"interval"` Payload interface{} `json:"payload"` QueueID string `json:"-"` QueueType string `json:"-"` Options *EnqueueRequestOptions `json:"-"` }
type EnqueueRequestOptions ¶
type EnqueueRequestOptions struct {
RequeueLimit int
}
type EnqueueResponse ¶
type ProxyClient ¶
type ProxyClient struct {
// contains filtered or unexported fields
}
func NewProxyClient ¶
func NewProxyClient(URL string) *ProxyClient
func (*ProxyClient) BulkEnqueue ¶
func (c *ProxyClient) BulkEnqueue(e []EnqueueRequest) []EnqueueResponse
func (*ProxyClient) Dequeue ¶
func (c *ProxyClient) Dequeue(queueType string) (*DequeueResponse, error)
func (*ProxyClient) Enqueue ¶
func (c *ProxyClient) Enqueue(e *EnqueueRequest) EnqueueResponse
func (*ProxyClient) Finish ¶
func (c *ProxyClient) Finish(queueType, queueID, jobID string) error
type ProxySharqError ¶
type ProxySharqError struct {
Message string
}
func (ProxySharqError) Error ¶
func (p ProxySharqError) Error() string
type Sharq ¶
type Sharq interface { Enqueue(e *EnqueueRequest) EnqueueResponse BulkEnqueue(e []EnqueueRequest) []EnqueueResponse Dequeue(queueType string) (*DequeueResponse, error) Finish(queueType, queueID, jobID string) error }
Click to show internal directories.
Click to hide internal directories.