MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / encodeEventData

Function encodeEventData

pkg/events/redis/codec.go:42–52  ·  view source on GitHub ↗
(evt events.Event)

Source from the content-addressed store, hash-verified

40}
41
42func encodeEventData(evt events.Event) (string, error) {
43 pb, err := events.Proto(evt)
44 if err != nil {
45 return "", err
46 }
47 bpb, err := proto.Marshal(pb)
48 if err != nil {
49 return "", err
50 }
51 return protoEncodingPrefix + encodeBinary(bpb), nil
52}
53
54var errUnknownEncoding = errors.DefineInvalidArgument("unknown_encoding", "unknown encoding")
55

Callers 2

PublishMethod · 0.85
storeEventMethod · 0.85

Calls 3

ProtoFunction · 0.92
encodeBinaryFunction · 0.85
MarshalMethod · 0.65

Tested by

no test coverage detected