MCPcopy Index your code
hub / github.com/keybase/client / MessageConsumer

Interface MessageConsumer

go/gregor/interface.go:147–154  ·  view source on GitHub ↗

MessageConsumer consumes state update messages. It's half of the state machine protocol

Source from the content-addressed store, hash-verified

145// MessageConsumer consumes state update messages. It's half of
146// the state machine protocol
147type MessageConsumer interface {
148 // ConsumeMessage is called on a new incoming message to mutate the state
149 // of the state machine. Of course messages can be "inband" which actually
150 // perform state mutations, or might be "out-of-band" that just use the
151 // Gregor broadcast mechanism to make sure that all clients get the
152 // notification. It returns a version of the message to broadcast to clients.
153 ConsumeMessage(ctx context.Context, m Message) (Message, error)
154}
155
156// StateMachine is the central interface of the Gregor system. Various parts of the
157// server and client infrastructure will implement various parts of this interface,

Callers 8

SyncFromTimeMethod · 0.65
ConsumeMessageMethod · 0.65
applyOutboxMessagesMethod · 0.65
outboxSendMethod · 0.65
DismissItemMethod · 0.65
DismissCategoryMethod · 0.65
InjectItemMethod · 0.65

Implementers 5

Clientgo/gregor/client/client.go
MemEnginego/gregor/storage/mem_sm.go
IncomingClientgo/protocol/gregor1/incoming.go
mockGregordgo/service/gregor_test.go
flakeyIncomingClientgo/service/gregor_test.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…