Documentation ¶
Index ¶
- type AgentServices
- type ClientServices
- type Config
- func (c *Config) ClientServices(baseLogger log.Logger, appName, appVersion string) (*ClientServices, error)
- func (Config) DefaultEmbeds() [][]byte
- func (c *Config) Services(baseLogger log.Logger, appName string, appVersion string) (pkgSupervisor.Service, error)
- func (c *Config) StreamServices(baseLogger log.Logger, appName string, appVersion string, topics ...string) (*StreamServices, error)
- type ConfigSpire
- func (c *ConfigSpire) ConfigureAgent(logger log.Logger, transport pkgTransport.Service, priceStore *store.Store) (*spire.Agent, error)
- func (c *ConfigSpire) ConfigureClient(kr ethereumConfig.KeyRegistry) (*spire.Client, error)
- func (c *ConfigSpire) PriceStore(l log.Logger, t pkgTransport.Service) (*store.Store, error)
- type StreamServices
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, appName, appVersion string) (*ClientServices, error)
ClientServices returns the services configured for Spire.
func (Config) DefaultEmbeds ¶ added in v0.22.1
func (*Config) Services ¶ added in v0.11.0
func (c *Config) Services(baseLogger log.Logger, appName string, appVersion string) (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, appName string, appVersion string, 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.