config

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const (
	CharacterName_Client = "client"
	CharacterName_Bucket = "bucket"
	CharacterName_Deoss  = "deoss"
)

default service name

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Rpc       []string
	Bootnodes []string
	Mnemonic  string
	Name      string
	Workspace string
	P2pPort   int
	Timeout   time.Duration
}

Config describes a set of settings for a client

func (*Config) Apply

func (cfg *Config) Apply(opts ...Option) error

Apply applies the given options to the config, returning the first error encountered (if any).

func (*Config) NewSDK

func (cfg *Config) NewSDK(serviceName string) (sdk.SDK, error)

NewSDK constructs a new client from the Config.

This function consumes the config. Do not reuse it (really!).

type Option

type Option func(cfg *Config) error

Option is a client config option that can be given to the client constructor

Jump to

Keyboard shortcuts

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