spire

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: AGPL-3.0 Imports: 12 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(ctx context.Context) error

func (*Agent) Wait

func (s *Agent) Wait() chan error

Wait waits until agent's context is cancelled.

type AgentConfig

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

type Client

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

func NewClient

func NewClient(cfg ClientConfig) (*Client, error)

func (*Client) PublishPrice

func (c *Client) PublishPrice(price *messages.Price) error

func (*Client) PullPrice

func (c *Client) PullPrice(assetPair string, feeder string) (*messages.Price, error)

func (*Client) PullPrices

func (c *Client) PullPrices(assetPair string, feeder string) ([]*messages.Price, error)

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

func (*Client) Wait

func (c *Client) Wait() chan error

Wait waits until the context is canceled or until an error occurs.

type ClientConfig

type ClientConfig struct {
	Signer  ethereum.Signer
	Address string
}

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
}

Jump to

Keyboard shortcuts

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