Documentation
¶
Index ¶
- type ActiveConnection
- type ActiveConnections
- type FullState
- type HttpServer
- func (a *HttpServer) ActiveConnections(rw http.ResponseWriter, _ *http.Request)
- func (a *HttpServer) KnownPeers(rw http.ResponseWriter, _ *http.Request)
- func (a *HttpServer) ListenAndServe() error
- func (a *HttpServer) Shutdown(ctx context.Context) error
- func (a *HttpServer) Spawned(rw http.ResponseWriter, _ *http.Request)
- type Retransmitter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveConnection ¶
type ActiveConnection struct {
Addr string `json:"addr"`
DeclAddr string `json:"decl_addr"`
Direction string `json:"direction"`
RemoteAddr string `json:"remote_addr"`
LocalAddr string `json:"local_addr"`
Version proto.Version `json:"version"`
AppName string `json:"app_name"`
NodeName string `json:"node_name"`
SendClosed bool `json:"send_closed"`
ReceiveClosed bool `json:"receive_closed"`
}
type ActiveConnections ¶
type ActiveConnections []ActiveConnection
func (ActiveConnections) Len ¶
func (a ActiveConnections) Len() int
func (ActiveConnections) Less ¶
func (a ActiveConnections) Less(i, j int) bool
func (ActiveConnections) Swap ¶
func (a ActiveConnections) Swap(i, j int)
type FullState ¶
type FullState struct {
Active []ActiveConnection
Spawned []string
Known []string
}
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(r Retransmitter) *HttpServer
func (*HttpServer) ActiveConnections ¶
func (a *HttpServer) ActiveConnections(rw http.ResponseWriter, _ *http.Request)
func (*HttpServer) KnownPeers ¶
func (a *HttpServer) KnownPeers(rw http.ResponseWriter, _ *http.Request)
func (*HttpServer) ListenAndServe ¶
func (a *HttpServer) ListenAndServe() error
func (*HttpServer) Spawned ¶
func (a *HttpServer) Spawned(rw http.ResponseWriter, _ *http.Request)
type Retransmitter ¶
type Retransmitter interface {
Counter() *utils.Counter
KnownPeers() *utils.KnownPeers
SpawnedPeers() *utils.SpawnedPeers
ActiveConnections() *utils.Addr2Peers
}
Click to show internal directories.
Click to hide internal directories.