Skip to content

Commit bfdb952

Browse files
authored
chore: adjust docs for types.Callbacks (#328)
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>
1 parent b7beae5 commit bfdb952

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

client/types/callbacks.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,14 @@ type MessageData struct {
4646
CustomMessage *protobufs.CustomMessage
4747
}
4848

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

0 commit comments

Comments
 (0)