Documentation
¶
Index ¶
Constants ¶
View Source
const (
MAX_CLIENTS = 1 // Maximum clients the server can have
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Participant ¶
type Participant interface {
// Registers a client with this participant
RegisterClient(client ParticipantClient) (xid.ID, error)
// Unregisters a client with this participant
UnregisterClient(clientID xid.ID) error
// Adds a change to the doc via the operation
AddDocChange(clientID xid.ID, docID string, op ot.Operation) error
// Updates the stored client info
UpdateClient(clientID xid.ID, client ParticipantClient) error
// Responds with the necessary list of operations in order to catch up
// to the current document state
DocCatchUp(clientID xid.ID, docID string) ([]ot.Operation, error)
}
Participant is a reader/writer participating in a Partner workspace
func NewParticipant ¶
func NewParticipant(myHostPort string, hostMap map[int]string, numParticipants, myID, numRetries int, replace bool, serverConstructor func(p Participant) ParticipantServer) (Participant, error)
type ParticipantClient ¶
Click to show internal directories.
Click to hide internal directories.