codec

package
v1.0.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CvpCodec

type CvpCodec interface {
	// EncodeStreamingLightValidators encodes the given light validators information into sorter string for streaming.
	// Input is assumed to be valid, otherwise panic.
	EncodeStreamingLightValidators(types.StreamingLightValidators) []byte

	// DecodeStreamingLightValidators decodes the given string into light validators.
	DecodeStreamingLightValidators([]byte) (types.StreamingLightValidators, error)

	// EncodeStreamingNextBlockVotingInformation encodes the given next block voting information into sorter string for streaming.
	// Input is assumed to be valid, otherwise panic.
	EncodeStreamingNextBlockVotingInformation(*types.StreamingNextBlockVotingInformation) []byte

	// DecodeStreamingNextBlockVotingInformation decodes the given string into next block voting information.
	DecodeStreamingNextBlockVotingInformation([]byte) (*types.StreamingNextBlockVotingInformation, error)
}

CvpCodec is the interface for encoding and decoding streaming data.

func NewProxyCvpCodec

func NewProxyCvpCodec() CvpCodec

NewProxyCvpCodec returns new instance of proxy CvpCodec.

The proxy automatically detect version of encoded data and forward to the corresponding implementation for decoding.

When invoking encode functions, it forward to default CvpCodec.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL