uisrv

package
v0.0.0-...-cb3ca1d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublishOffering    = "publish"
	PopupOffering      = "popup"
	DeactivateOffering = "deactivate"
)

Actions that change offerings state.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionPayload

type ActionPayload struct {
	Action string `json:"action"`
}

ActionPayload is a body format for action requests.

type Config

type Config struct {
	Addr           string
	TLS            *TLSConfig
	EthCallTimeout uint // In seconds.
}

Config is a configuration for a agent server.

func NewConfig

func NewConfig() *Config

NewConfig creates a default server configuration.

type OfferingPutPayload

type OfferingPutPayload struct {
	Action   string `json:"action"`
	GasPrice uint64 `json:"gasPrice"`
}

OfferingPutPayload offering status update payload.

type Server

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

Server is agent api server.

func NewServer

func NewServer(conf *Config,
	logger *util.Logger,
	db *reform.DB,
	queue *job.Queue,
	pwdStorage data.PWDGetSetter) *Server

NewServer creates a new agent server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe starts a server.

type TLSConfig

type TLSConfig struct {
	CertFile string
	KeyFile  string
}

TLSConfig is a tls configuration.

Jump to

Keyboard shortcuts

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