unack

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package unack is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStore

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

MockStore is a mock of Store interface

func NewMockStore

func NewMockStore(ctrl *gomock.Controller) *MockStore

NewMockStore creates a new mock instance

func (*MockStore) EXPECT

func (m *MockStore) EXPECT() *MockStoreMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockStore) Init

func (m *MockStore) Init(cleanStart bool) error

Init mocks base method

func (*MockStore) Remove

func (m *MockStore) Remove(id packets.PacketID) error

Remove mocks base method

func (*MockStore) Set

func (m *MockStore) Set(id packets.PacketID) (bool, error)

Set mocks base method

type MockStoreMockRecorder

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

MockStoreMockRecorder is the mock recorder for MockStore

func (*MockStoreMockRecorder) Init

func (mr *MockStoreMockRecorder) Init(cleanStart interface{}) *gomock.Call

Init indicates an expected call of Init

func (*MockStoreMockRecorder) Remove

func (mr *MockStoreMockRecorder) Remove(id interface{}) *gomock.Call

Remove indicates an expected call of Remove

func (*MockStoreMockRecorder) Set

func (mr *MockStoreMockRecorder) Set(id interface{}) *gomock.Call

Set indicates an expected call of Set

type Store

type Store interface {
	// Init will be called when the client connect.
	// If cleanStart set to true, the implementation should remove any associated data in backend store.
	// If it set to false, the implementation should retrieve the associated data from backend store.
	Init(cleanStart bool) error
	// Set sets the given id into store.
	// The return boolean indicates whether the id exist.
	Set(id packets.PacketID) (bool, error)
	// Remove removes the given id from store.
	Remove(id packets.PacketID) error
}

Store represents a unack store for one client. Unack store is used to persist the unacknowledged qos2 messages.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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