Documentation ¶
Index ¶
- type AddPeerRequest
- type AddPeerResponse
- type AddPeersRequest
- type AddPeersResponse
- type AdminSocket
- type AdminSocketRequest
- type AdminSocketResponse
- type DHTEntry
- type DataUnit
- 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 ListenAddress
- type PathEntry
- type PeerEntry
- type RemovePeerRequest
- type RemovePeerResponse
- type SessionEntry
- type SetupOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPeerRequest ¶
type AddPeerResponse ¶
type AddPeerResponse struct{}
type AddPeersRequest ¶
type AddPeersResponse ¶
type AddPeersResponse struct {
List []string `json:"list"`
}
type AdminSocket ¶
type AdminSocket struct {
// contains filtered or unexported fields
}
func New ¶
func New(c *core.Core, log core.Logger, opts ...SetupOption) (*AdminSocket, error)
Init runs the initial admin setup.
func (*AdminSocket) AddHandler ¶
func (a *AdminSocket) AddHandler(name, desc 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) IsStarted ¶
func (a *AdminSocket) IsStarted() bool
IsStarted returns true if the module has been started.
func (*AdminSocket) SetupAdminHandlers ¶
func (a *AdminSocket) SetupAdminHandlers()
func (*AdminSocket) StartHttpServer ¶
func (a *AdminSocket) StartHttpServer(nc *config.NodeConfig)
Start runs http server
func (*AdminSocket) Stop ¶
func (a *AdminSocket) Stop() error
Stop will stop the admin API and close the socket.
type AdminSocketRequest ¶
type AdminSocketRequest struct { Name string `json:"request"` Arguments json.RawMessage `json:"arguments,omitempty"` KeepAlive bool `json:"keepalive,omitempty"` }
type AdminSocketResponse ¶
type AdminSocketResponse struct { Status string `json:"status"` Error string `json:"error,omitempty"` Request json.RawMessage `json:"request"` Response json.RawMessage `json:"response"` }
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type GetDHTRequest ¶
type GetDHTRequest struct{}
type GetDHTResponse ¶
type GetDHTResponse struct {
DHT []DHTEntry `json:"dht"`
}
type GetPathsRequest ¶
type GetPathsRequest struct { }
type GetPathsResponse ¶
type GetPathsResponse struct {
Paths []PathEntry `json:"paths"`
}
type GetPeersRequest ¶
type GetPeersRequest struct { }
type GetPeersResponse ¶
type GetPeersResponse struct {
Peers []PeerEntry `json:"peers"`
}
type GetSelfRequest ¶
type GetSelfRequest struct{}
type GetSelfResponse ¶
type GetSessionsRequest ¶
type GetSessionsRequest struct{}
type GetSessionsResponse ¶
type GetSessionsResponse struct {
Sessions []SessionEntry `json:"sessions"`
}
type ListResponse ¶
type ListResponse struct {
List []ListEntry `json:"list"`
}
type ListenAddress ¶
type ListenAddress string
type RemovePeerRequest ¶
type RemovePeerResponse ¶
type RemovePeerResponse struct{}
type SessionEntry ¶
type SetupOption ¶
type SetupOption interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.