gofer

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: AGPL-3.0 Imports: 13 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 {
	PriceProvider provider.Provider
	Agent         *rpc.Agent
	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 {
	PriceProvider provider.Provider
	PriceHook     provider.PriceHook
	Marshaller    marshal.Marshaller
	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 {
	Gofer    priceProviderConfig.Config `hcl:"gofer,block"`
	Ethereum *ethereumConfig.Config     `hcl:"ethereum,block,optional"`
	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 Gofer.

func (*Config) ClientServices added in v0.10.0

func (c *Config) ClientServices(
	ctx context.Context,
	baseLogger log.Logger,
	noRPC bool,
	format marshal.FormatType,
) (*ClientServices, error)

ClientServices returns the services configured for Gofer.

func (*Config) Services added in v0.11.0

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

Services returns the services configured for Gofer Agent.

Jump to

Keyboard shortcuts

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