Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrServerAlreadyRunning = errors.New("server already running")
Functions ¶
This section is empty.
Types ¶
type AuthCb ¶
type AuthCb func(request *RequestEventSubmission) bool
Within RequestEventSubmission, we optionally add Auth with allows users to encode their preferred auth info. This cb sends that back to the user to perform auth, then a simple T/F return dictates if the request is ok
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint is the http endpoint that contains all of the required data to get http off the wire and formed into a proper nerv event for publishing
func (*Endpoint) RecvModulePane ¶
func (ep *Endpoint) RecvModulePane(p *nerv.ModulePane)
type PingResponse ¶
func SubmitPing ¶
func SubmitPing(address string, count int, max_failures int) PingResponse
Attempt to ping a server to see if its actually a nerv modhttp
type RequestEventSubmission ¶
type RequestEventSubmission struct { Auth interface{} Event nerv.Event }
type SubmissionResponse ¶
func SubmitEvent ¶
func SubmitEvent(address string, event *nerv.Event) (*SubmissionResponse, error)
Submit an event without Auth information
func SubmitEventWithAuth ¶
func SubmitEventWithAuth(address string, event *nerv.Event, auth interface{}) (*SubmissionResponse, error)
Submit an event with the optional Auth interface. Auth will be encoded into JSON with the rest of the message. The server, detecting Auth, will execute server-side callback to have the information analyzed, and conditionally, permit the event submission