spire

package
v0.0.0-...-9e55092 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: AGPL-3.0 Imports: 14 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) Publish

func (n *API) Publish(arg *PublishArg, _ *Nothing) error

func (*API) PullPoint

func (n *API) PullPoint(arg *PullPriceArg, resp *PullDataPointResp) error

func (*API) PullPoints

func (n *API) PullPoints(arg *PullPricesArg, resp *PullDataPointsResp) 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.Store
	Transport  transport.Service
	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) Publish

func (c *Client) Publish(dataPoint *messages.DataPoint) error

func (*Client) PullPrice

func (c *Client) PullPrice(assetPair string, feed string) (*messages.DataPoint, error)

func (*Client) PullPrices

func (c *Client) PullPrices(assetPair string, feed string) ([]*messages.DataPoint, 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 PublishArg

type PublishArg struct {
	DataPoint *messages.DataPoint
}

type PullDataPointResp

type PullDataPointResp struct {
	DataPoint *messages.DataPoint
}

type PullDataPointsResp

type PullDataPointsResp struct {
	DataPoints []*messages.DataPoint
}

type PullPriceArg

type PullPriceArg struct {
	AssetPair string
	Feed      string
}

type PullPricesArg

type PullPricesArg struct {
	FilterAssetPair string
	FilterFeed      string
}

Jump to

Keyboard shortcuts

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