config

package
v0.0.68 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 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"
)

SDK available character name

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Rpc      []string
	Mnemonic string
	Name     string
	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(roleName 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