geth

package
v0.0.0-...-3b153a2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Native   Mode = "native"
	External      = "external"
	Infura        = "infura"
	Light         = "light"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base = base.Service

type BaseConfig

type BaseConfig = base.Config

type Config

type Config struct {
	BaseConfig

	Mode                string `usage:"%(name)s service mode"`
	Rpcscheme           string `usage:"External %(name)s RPC scheme (http, https)"`
	Rpchost             string `usage:"External %(name)s RPC hostname"`
	Rpcport             uint16 `usage:"External %(name)s RPC port"`
	InfuraProjectId     string `usage:"Infura %(name)s provider project ID"`
	InfuraProjectSecret string `usage:"Infura %(name)s provider project secret"`
	Cache               string `usage:"%(name)s cache size"`
	AncientChaindataDir string `usage:"Specify the container's volume mapping ancient chaindata directory. Can be located on a slower HDD."`
}

type Mode

type Mode string

type RpcParams

type RpcParams struct {
	Type   string `json:"type"`
	Scheme string `json:"scheme"`
	Host   string `json:"host"`
	Path   string `json:"path"`
	Port   uint16 `json:"port"`
}

func (RpcParams) ToUri

func (t RpcParams) ToUri() string

type Service

type Service struct {
	*Base

	Mode      Mode
	RpcParams RpcParams
}

func New

func New(ctx types.Context, name string) (*Service, error)

func (*Service) Apply

func (t *Service) Apply(cfg interface{}) error

func (*Service) GetDefaultConfig

func (t *Service) GetDefaultConfig() interface{}

func (*Service) GetMode

func (t *Service) GetMode() string

func (*Service) GetRpcParams

func (t *Service) GetRpcParams() (interface{}, error)

Jump to

Keyboard shortcuts

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