pcodecsmock

package
v1.29.4 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package pcodecsmock provides a gomock-driven mock of the pcodecs.Manager interface (= proto/zap_codec.MultiManager) so node/vms test files can program codec expectations without importing proto/zap_codec or luxfi/codec directly.

Wave 2G-Internal of the codec rip (#101) replaces the previous re-export of luxfi/codec/codecmock with an in-tree mock of the proto/zap_codec.MultiManager interface. The mock satisfies pcodecs.Manager by shape — RegisterCodec / Marshal / Unmarshal / Size — and is independent of the underlying codec wire format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is the gomock-driven mock of pcodecs.Manager (= zap_codec.MultiManager). Tests reach for pcodecsmock.NewManager(ctrl) to obtain a mock that satisfies pcodecs.Manager by shape.

func NewManager

func NewManager(ctrl *gomock.Controller) *Manager

NewManager constructs a fresh Manager mock against the supplied gomock controller.

func (*Manager) EXPECT added in v1.29.3

func (m *Manager) EXPECT() *ManagerRecorder

EXPECT returns the recorder so tests can program expectations.

func (*Manager) Marshal added in v1.29.3

func (m *Manager) Marshal(version uint16, source interface{}) ([]byte, error)

Marshal mocks the corresponding MultiManager method.

func (*Manager) RegisterCodec added in v1.29.3

func (m *Manager) RegisterCodec(version uint16, codec zap_codec.Codec) error

RegisterCodec mocks the corresponding MultiManager method.

func (*Manager) Size added in v1.29.3

func (m *Manager) Size(version uint16, value interface{}) (int, error)

Size mocks the corresponding MultiManager method.

func (*Manager) Unmarshal added in v1.29.3

func (m *Manager) Unmarshal(source []byte, destination interface{}) (uint16, error)

Unmarshal mocks the corresponding MultiManager method.

type ManagerRecorder added in v1.29.3

type ManagerRecorder struct {
	// contains filtered or unexported fields
}

ManagerRecorder is the gomock recorder for Manager. Tests program expectations via mock.EXPECT().<Method>(...).Return(...).

func (*ManagerRecorder) Marshal added in v1.29.3

func (mr *ManagerRecorder) Marshal(version, source any) *gomock.Call

Marshal expectation.

func (*ManagerRecorder) RegisterCodec added in v1.29.3

func (mr *ManagerRecorder) RegisterCodec(version, codec any) *gomock.Call

RegisterCodec expectation.

func (*ManagerRecorder) Size added in v1.29.3

func (mr *ManagerRecorder) Size(version, value any) *gomock.Call

Size expectation.

func (*ManagerRecorder) Unmarshal added in v1.29.3

func (mr *ManagerRecorder) Unmarshal(source, destination any) *gomock.Call

Unmarshal expectation.

Jump to

Keyboard shortcuts

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