MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / decodeStreams

Method decodeStreams

structure/stream.go:656–663  ·  view source on GitHub ↗

decodeStreams decodes the streams. It takes the encoded data as a byte slice and the target Streams object as arguments. Parameters: ss: The encoded data as a byte slice. ss2: The target Streams object to store the decoded data. Returns: error: An error if any occurred during the decoding pro

(ss []byte, ss2 *Streams)

Source from the content-addressed store, hash-verified

654// - If any error occurs during the decoding process, it will be returned.
655// - On success, it returns nil.
656func (s *StreamStructure) decodeStreams(ss []byte, ss2 *Streams) error {
657 // Decode the streams
658 if err := json.Unmarshal(ss, ss2); err != nil {
659 fmt.Println("err", err)
660 return err
661 }
662 return nil
663}
664
665// encodeStreamGroup encodes the stream group.
666// It takes the StreamGroup object as an argument and returns the encoded data as a byte slice.

Callers 8

XAddMethod · 0.95
XReadMethod · 0.95
XDelMethod · 0.95
XLenMethod · 0.95
XRangeMethod · 0.95
XRevRangeMethod · 0.95
XTrimMethod · 0.95
XGroupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected