spire

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentServices added in v0.10.0

type AgentServices struct {
	SpireAgent *spire.Agent
	Transport  pkgTransport.Service
	PriceStore *store.Store
	Logger     log.Logger
	// contains filtered or unexported fields
}

AgentServices returns the services that are configured from the Config struct.

func (*AgentServices) Start added in v0.10.0

func (s *AgentServices) Start(ctx context.Context) error

Start implements the supervisor.Service interface.

func (*AgentServices) Wait added in v0.10.0

func (s *AgentServices) Wait() <-chan error

Wait implements the supervisor.Service interface.

type ClientServices added in v0.10.0

type ClientServices struct {
	SpireClient *spire.Client
	Logger      log.Logger
	// contains filtered or unexported fields
}

ClientServices returns the services that are configured from the Config struct.

func (*ClientServices) Start added in v0.10.0

func (s *ClientServices) Start(ctx context.Context) error

Start implements the supervisor.Service interface.

func (*ClientServices) Wait added in v0.10.0

func (s *ClientServices) Wait() <-chan error

Wait implements the supervisor.Service interface.

type Config added in v0.10.0

type Config struct {
	Spire     ConfigSpire            `hcl:"spire,block"`
	Transport transportConfig.Config `hcl:"transport,block"`
	Ethereum  ethereumConfig.Config  `hcl:"ethereum,block"`
	Logger    *loggerConfig.Config   `hcl:"logger,block,optional"`

	// HCL fields:
	Remain  hcl.Body        `hcl:",remain"` // To ignore unknown blocks.
	Content hcl.BodyContent `hcl:",content"`
}

Config is the configuration for Spire.

func (*Config) ClientServices added in v0.10.0

func (c *Config) ClientServices(baseLogger log.Logger) (*ClientServices, error)

ClientServices returns the services configured for Spire.

func (*Config) Services added in v0.11.0

func (c *Config) Services(baseLogger log.Logger) (pkgSupervisor.Service, error)

Services returns the services configured for Spire.

func (*Config) StreamServices added in v0.10.0

func (c *Config) StreamServices(baseLogger log.Logger, topics ...string) (*StreamServices, error)

StreamServices returns the services configured for Spire.

type ConfigSpire added in v0.10.0

type ConfigSpire struct {
	// RPCListenAddr is an address to listen for RPC requests.
	RPCListenAddr string `hcl:"rpc_listen_addr"`

	// RPCAgentAddr is an address of the agent to connect to.
	RPCAgentAddr string `hcl:"rpc_agent_addr"`

	// Pairs is a list of pairs to store in the price store.
	Pairs []string `hcl:"pairs"`

	// Pairs is a list of pairs to store in the price store.
	Feeds []types.Address `hcl:"feeds"`

	// EthereumKey is a name of an Ethereum key to use for signing
	// prices.
	EthereumKey string `hcl:"ethereum_key,optional"`

	// HCL fields:
	Range   hcl.Range       `hcl:",range"`
	Content hcl.BodyContent `hcl:",content"`
	// contains filtered or unexported fields
}

func (*ConfigSpire) ConfigureAgent added in v0.10.0

func (c *ConfigSpire) ConfigureAgent(
	logger log.Logger,
	transport pkgTransport.Service,
	priceStore *store.Store,
) (
	*spire.Agent, error,
)

func (*ConfigSpire) ConfigureClient added in v0.10.0

func (c *ConfigSpire) ConfigureClient(kr ethereumConfig.KeyRegistry) (*spire.Client, error)

func (*ConfigSpire) PriceStore added in v0.10.0

func (c *ConfigSpire) PriceStore(l log.Logger, t pkgTransport.Service) (*store.Store, error)

type StreamServices added in v0.10.0

type StreamServices struct {
	Transport pkgTransport.Service
	Logger    log.Logger
	// contains filtered or unexported fields
}

StreamServices returns the services that are configured from the Config struct.

func (*StreamServices) Start added in v0.10.0

func (s *StreamServices) Start(ctx context.Context) error

Start implements the supervisor.Service interface.

func (*StreamServices) Wait added in v0.10.0

func (s *StreamServices) Wait() <-chan error

Wait implements the supervisor.Service interface.

Jump to

Keyboard shortcuts

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