util

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Wrap is the number of characters to Wrap the help text at
	Wrap int = 50
)

Variables

This section is empty.

Functions

func BindCommandFlags

func BindCommandFlags(cmd *cobra.Command) error

BindCommandFlags binds a command's flags to viper

func GetClientConfig

func GetClientConfig() *common.ClientConfig

GetClientConfig reads client configuration from viper

func GetSerializer

func GetSerializer() (serializer.IRPCSerializer, error)

GetSerializer creates a serializer based on configuration

func GetShardID

func GetShardID() uint64

GetShardID retrieves the configured shard ID

func GetTransport

func GetTransport() (transport.IRPCClientTransport, error)

GetTransport creates transport based on configuration

func InitClientConfig

func InitClientConfig()

InitClientConfig initializes configuration from environment variables

func SetupRPCClientFlags

func SetupRPCClientFlags(cmd *cobra.Command)

SetupRPCClientFlags adds common RPC connection flags to a command

func WrapString

func WrapString(text string) string

WrapString wraps a string at Wrap characters

Types

This section is empty.

Jump to

Keyboard shortcuts

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