Skip to content

Commit

Permalink
chore: adjust docs for types.Callbacks (#328)
Browse files Browse the repository at this point in the history
Now that types.Callbacks is a struct and not an interface, its docs need
adjusting so that the struct doesn't claim to be an interface.

Signed-off-by: Eric Chlebek <echlebek@sumologic.com>
  • Loading branch information
echlebek authored Jan 6, 2025
1 parent b7beae5 commit bfdb952
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client/types/callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@ type MessageData struct {
CustomMessage *protobufs.CustomMessage
}

// Callbacks is an interface for the Client to handle messages from the Server.
// Callbacks are expected to honour the context passed to them, meaning they should be aware of cancellations.
// Callbacks contains functions that are executed when the client encounters
// particular events.
//
// In most cases, defaults will be set when library users
// opt not to provide one. See SetDefaults for more information.
//
// Callbacks are expected to honour the context passed to them, meaning they
// should be aware of cancellations.
type Callbacks struct {
// OnConnect is called when the connection is successfully established to the Server.
// May be called after Start() is called and every time a connection is established to the Server.
Expand Down

0 comments on commit bfdb952

Please sign in to comment.