spire

package
v0.12.0-dev.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: AGPL-3.0 Imports: 15 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 {
	PriceStore *store.PriceStore
	Transport  transport.Transport
	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, feed string) (*messages.Price, error)

func (*Client) PullPrices

func (c *Client) PullPrices(assetPair string, feed 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  wallet.Key
	Address string
}

type Nothing

type Nothing = struct{}

type PublishPriceArg

type PublishPriceArg struct {
	Price *messages.Price
}

type PullPriceArg

type PullPriceArg struct {
	AssetPair string
	Feed      string
}

type PullPriceResp

type PullPriceResp struct {
	Price *messages.Price
}

type PullPricesArg

type PullPricesArg struct {
	FilterAssetPair string
	FilterFeed      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