service

package
v0.0.0-...-4c0346d Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2018 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MinWorkerConcurrency is the minimum number of concurrent jobs the worker
	// should process
	MinWorkerConcurrency = 1

	// MaxWorkerConcurrency is the maximum number of concurrent jobs the worker
	// should process
	MaxWorkerConcurrency = 10

	// MinWorkerMaxRetries is minimum number that can be set for the worker's
	// maximum-retries
	MinWorkerMaxRetries = 0
)
View Source
const (
	// MinRequestTTL in the minimum TTL that we should allow to be set on requests
	MinRequestTTL = 300
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the application client

func NewClient

func NewClient() Client

NewClient creates an initialized application client

func (*Client) StartServer

func (clt *Client) StartServer()

StartServer starts the application web server

func (*Client) StartWorker

func (c *Client) StartWorker()

StartWorker starts the application background worker

type ConversionJob

type ConversionJob struct {
	Identifier    string `redis:"uuid"`
	CreatedAt     string `redis:"created_at"`
	StartedAt     string `redis:"started_at"`
	EndedAt       string `redis:"ended_at"`
	ExpiresIn     int    `redis:"expires_in"`
	Status        string `redis:"status"`
	Logs          []byte `redis:"logs"`
	StorageBucket string `redis:"storage_bucket"`
	StorageKey    string `redis:"storage_key"`
	RequestType   string `redis:"request_type"`
	RequestData   []byte `redis:"request_data"`
}

ConversionJob is a mapping of a conversion job's attributes

type Version

type Version struct {
	Major  string
	Minor  string
	Patch  string
	Commit string
}

Version represents version information.

func GetVersion

func GetVersion() Version

GetVersion returns version information.

func (*Version) Str

func (v *Version) Str() string

Str returns version information as a string

Jump to

Keyboard shortcuts

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