cprofile

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug() bool

func Env

func Env() string

func GetConfig

func GetConfig(path ...any) cfacade.ProfileJSON

func GetNodeWithConfig

func GetNodeWithConfig(config *Config, nodeID string) (cfacade.INode, error)

func Init

func Init(filePath, nodeID string) (cfacade.INode, error)

func LoadNode

func LoadNode(nodeID string) (cfacade.INode, error)

func Name

func Name() string

func Path

func Path() string

func PrintLevel

func PrintLevel() string

Types

type Config

type Config struct {
	jsoniter.Any
}

func LoadFile

func LoadFile(filePath, fileName string) (*Config, error)

func Wrap

func Wrap(val any) *Config

func (*Config) GetBool

func (p *Config) GetBool(path any, defaultVal ...bool) bool

func (*Config) GetConfig

func (p *Config) GetConfig(path ...any) cfacade.ProfileJSON

func (*Config) GetDuration

func (p *Config) GetDuration(path any, defaultVal ...time.Duration) time.Duration

func (*Config) GetInt

func (p *Config) GetInt(path any, defaultVal ...int) int

func (*Config) GetInt32

func (p *Config) GetInt32(path any, defaultVal ...int32) int32

func (*Config) GetInt64

func (p *Config) GetInt64(path any, defaultVal ...int64) int64

func (*Config) GetString

func (p *Config) GetString(path any, defaultVal ...string) string

func (*Config) Unmarshal

func (p *Config) Unmarshal(value any) error

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node node info

func (*Node) Address

func (n *Node) Address() string

func (*Node) Enabled

func (n *Node) Enabled() bool

func (*Node) NodeID

func (n *Node) NodeID() string

func (*Node) NodeType

func (n *Node) NodeType() string

func (*Node) RpcAddress

func (n *Node) RpcAddress() string

func (*Node) Settings

func (n *Node) Settings() cfacade.ProfileJSON

func (*Node) String

func (n *Node) String() string

Jump to

Keyboard shortcuts

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