gofer

package
v0.11.0-dev.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 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) AgentServices added in v0.10.0

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

AgentServices returns the services configured for Gofer Agent.

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.

Jump to

Keyboard shortcuts

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