spire

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AgentLoggerTag = "SPIRE_AGENT"

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func (*API) PublishPrice

func (n *API) PublishPrice(arg *PublishPriceArg, _ *Nothing) error

func (*API) PullPrice

func (n *API) PullPrice(arg *PullPriceArg, resp *PullPriceResp) error

func (*API) PullPrices

func (n *API) PullPrices(arg *PullPricesArg, resp *PullPricesResp) error

type Agent

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

func NewAgent

func NewAgent(cfg AgentConfig) (*Agent, error)

func (*Agent) Start

func (s *Agent) Start() error

func (*Agent) Stop

func (s *Agent) Stop()

type AgentConfig

type AgentConfig struct {
	Datastore Datastore
	Transport transport.Transport
	Signer    ethereum.Signer
	Network   string
	Address   string
	Logger    log.Logger
}

type Config

type Config struct {
	Signer  ethereum.Signer
	Network string
	Address string
}

type Datastore

type Datastore interface {
	Prices() *datastore.PriceStore
	Start() error
	Stop() error
}

type Nothing

type Nothing = struct{}

type PublishPriceArg

type PublishPriceArg struct {
	Price *messages.Price
}

type PullPriceArg

type PullPriceArg struct {
	AssetPair string
	Feeder    string
}

type PullPriceResp

type PullPriceResp struct {
	Price *messages.Price
}

type PullPricesArg

type PullPricesArg struct {
	FilterAssetPair string
	FilterFeeder    string
}

type PullPricesResp

type PullPricesResp struct {
	Prices []*messages.Price
}

type Spire

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

func NewSpire

func NewSpire(cfg Config) *Spire

func (*Spire) PublishPrice

func (s *Spire) PublishPrice(price *messages.Price) error

func (*Spire) PullPrice

func (s *Spire) PullPrice(assetPair string, feeder string) (*messages.Price, error)

func (*Spire) PullPrices

func (s *Spire) PullPrices(assetPair string, feeder string) ([]*messages.Price, error)

func (*Spire) Start

func (s *Spire) Start() error

func (*Spire) Stop

func (s *Spire) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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