Documentation
¶
Index ¶
- type AdminSocket
- func (a *AdminSocket) AddHandler(name string, args []string, handlerfunc core.AddHandlerFunc) error
- func (a *AdminSocket) Init(c *core.Core, nc *config.NodeConfig, log *log.Logger, options interface{}) error
- func (a *AdminSocket) IsStarted() bool
- func (a *AdminSocket) SetupAdminHandlers(na *AdminSocket)
- func (a *AdminSocket) Start() error
- func (a *AdminSocket) Stop() error
- type AdminSocketResponse
- type DHTEntry
- type ErrorResponse
- type GetDHTRequest
- type GetDHTResponse
- type GetPathsRequest
- type GetPathsResponse
- type GetPeersRequest
- type GetPeersResponse
- type GetSelfRequest
- type GetSelfResponse
- type GetSessionsRequest
- type GetSessionsResponse
- type ListEntry
- type ListResponse
- type PathEntry
- type PeerEntry
- type SelfEntry
- type SessionEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminSocket ¶
type AdminSocket struct {
// contains filtered or unexported fields
}
func (*AdminSocket) AddHandler ¶
func (a *AdminSocket) AddHandler(name string, args []string, handlerfunc core.AddHandlerFunc) error
AddHandler is called for each admin function to add the handler and help documentation to the API.
func (*AdminSocket) Init ¶
func (a *AdminSocket) Init(c *core.Core, nc *config.NodeConfig, log *log.Logger, options interface{}) error
Init runs the initial admin setup.
func (*AdminSocket) IsStarted ¶
func (a *AdminSocket) IsStarted() bool
IsStarted returns true if the module has been started.
func (*AdminSocket) SetupAdminHandlers ¶
func (a *AdminSocket) SetupAdminHandlers(na *AdminSocket)
func (*AdminSocket) Start ¶
func (a *AdminSocket) Start() error
Start runs the admin API socket to listen for / respond to admin API calls.
func (*AdminSocket) Stop ¶
func (a *AdminSocket) Stop() error
Stop will stop the admin API and close the socket.
type AdminSocketResponse ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type GetDHTRequest ¶
type GetDHTRequest struct{}
type GetDHTResponse ¶
type GetPathsRequest ¶
type GetPathsRequest struct { }
type GetPathsResponse ¶
type GetPeersRequest ¶
type GetPeersRequest struct { }
type GetPeersResponse ¶
type GetSelfRequest ¶
type GetSelfRequest struct{}
type GetSelfResponse ¶
type GetSessionsRequest ¶
type GetSessionsRequest struct{}
type GetSessionsResponse ¶
type GetSessionsResponse struct {
Sessions map[string]SessionEntry `json:"sessions"`
}
type ListResponse ¶
type SessionEntry ¶
type SessionEntry struct {
PublicKey string `json:"key"`
}
Click to show internal directories.
Click to hide internal directories.