Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { System bool `json:"-"` // used for internal messages From User `json:"from"` Content string `json:"content"` }
Message represents a chat message.
func GenerateMessage ¶
GenerateMessage creates a new message using the Excuser API [1].
type Notification ¶
type Notification struct { Event NotificationEvent `json:"event"` User User `json:"user"` }
Notification represents a notification sent by the service registry.
type NotificationEvent ¶
type NotificationEvent string
NotificationEvent represents the type of event that happened.
const ( NotificationEventUserJoined NotificationEvent = "userJoined" NotificationEventUserLeft NotificationEvent = "userLeft" )
List of possible notification events.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry represents a service registry.
func NewRegistry ¶
NewRegistry creates a new service registry.
func (Registry) Unregister ¶
Unregister unregisters a user from the service registry.
Click to show internal directories.
Click to hide internal directories.