Documentation ¶
Overview ¶
Package cfg manages the configuration file for avash
Index ¶
Constants ¶
const DefaultCfgName = ".avash.yaml"
DefaultCfgName is the default config filename
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 ¶
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