Documentation ¶
Index ¶
- type GetMessagesStats
- type HTTP
- func (api *HTTP) ApplyMessageWait(msg *robust.Message, timeout time.Duration) error
- func (api *HTTP) DispatchPrivate(w http.ResponseWriter, r *http.Request)
- func (api *HTTP) DispatchPrivateWithoutAuth(w http.ResponseWriter, r *http.Request)
- func (api *HTTP) DispatchPublic(w http.ResponseWriter, r *http.Request)
- func (h *HTTP) ReplaceState(ircServer *ircserver.IRCServer, ircStore *raftstore.LevelDBStore, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetMessagesStats ¶
type GetMessagesStats struct { RemoteAddr string Session robust.Id Nick string Started time.Time UserAgent string ForwardedFor string TrustedBridge string // contains filtered or unexported fields }
GetMessageStats encapsulates information about a GetMessages request.
func (GetMessagesStats) NickWithFallback ¶
func (stats GetMessagesStats) NickWithFallback() string
func (GetMessagesStats) StartedAndRelative ¶
func (stats GetMessagesStats) StartedAndRelative() string
StartedAndRelative converts |stats.Started| into a human-readable formatted time, followed by a relative time specification.
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
HTTP provides an HTTP API to RobustIRC, including HTTP handlers for interactive use (e.g. status pages).
func NewHTTP ¶
func NewHTTP(ircServer *ircserver.IRCServer, raftNode *raft.Raft, ircStore *raftstore.LevelDBStore, output *outputstream.OutputStream, transport *rafthttp.HTTPTransport, network string, networkPassword string, raftDir string, peerAddr string, useProtobuf bool, raftProtocolVersion int) *HTTP
NewHTTP creates a new HTTP API handler.
func (*HTTP) ApplyMessageWait ¶
TODO: unexport this, find the correct abstraction layer
func (*HTTP) DispatchPrivate ¶
func (api *HTTP) DispatchPrivate(w http.ResponseWriter, r *http.Request)
func (*HTTP) DispatchPrivateWithoutAuth ¶
func (api *HTTP) DispatchPrivateWithoutAuth(w http.ResponseWriter, r *http.Request)
func (*HTTP) DispatchPublic ¶
func (api *HTTP) DispatchPublic(w http.ResponseWriter, r *http.Request)
func (*HTTP) ReplaceState ¶
func (h *HTTP) ReplaceState(ircServer *ircserver.IRCServer, ircStore *raftstore.LevelDBStore, output *outputstream.OutputStream)
Click to show internal directories.
Click to hide internal directories.