cfg

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package cfg manages the configuration file for avash

Index

Constants

View Source
const DefaultCfgName = ".avash.yaml"

DefaultCfgName is the default config filename

View Source
const DefaultCfgNameShort = ".avash.yml"

DefaultCfgNameShort is the default config filename with yml extension

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(cfgpath string)

InitConfig initializes the config for commands to reference

Types

type Configuration

type Configuration struct {
	AvalancheLocation, DataDir string
	Log                        logging.Log
}

Configuration is a shell-usable wrapper of the config file

var Config Configuration

Config is a global instance of the shell configuration

type RPCService

type RPCService struct {
	RPCServer  *rpc.Server
	HTTPRouter *mux.Router
	// contains filtered or unexported fields
}

RPCService is for maintaining a reference to the root JSON RPC server and the HTTP router

var AvashRPC *RPCService

AvashRPC is the RPCService handler for the avash service

func (*RPCService) AddService

func (rpcsrv *RPCService) AddService(serviceInstance interface{}, endpoint string)

AddService registers the appropriate endpoint for the plugin given a symbol

func (*RPCService) Initialize

func (rpcsrv *RPCService) Initialize(urlpath string, host string, port string)

Initialize creates the RPC server at the provided baseurl, hostname, and port

func (*RPCService) RegisterServer

func (rpcsrv *RPCService) RegisterServer(s *rpc.Server, r *mux.Router)

RegisterServer registers the adds the rpc and http servers to the plugins service

Jump to

Keyboard shortcuts

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