blocker

package
v0.0.0-...-c092c37 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package blocker is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocker

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

Blocker blocks tasks by executor name and fingerprint.

func New

func New(cache cacher) *Blocker

New creates Blocker instance.

func (*Blocker) BlockForTTL

func (b *Blocker) BlockForTTL(executor, fingerprint string, ttl time.Duration) error

BlockForTTL blocks task by executor name and fingeprint for needed TTL.

func (*Blocker) BlockInProgress

func (b *Blocker) BlockInProgress(executor, fingerprint string) (blockedSuccessfully bool, err error)

BlockInProgress blocks task by executor name and fingeprint while executing.

func (*Blocker) Unblock

func (b *Blocker) Unblock(executor, fingerprint string)

Unblock unblocks task by executor name and fingeprint.

type Mockcacher

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

Mockcacher is a mock of cacher interface

func NewMockcacher

func NewMockcacher(ctrl *gomock.Controller) *Mockcacher

NewMockcacher creates a new mock instance

func (*Mockcacher) Del

func (m *Mockcacher) Del(key []byte) bool

Del mocks base method

func (*Mockcacher) EXPECT

func (m *Mockcacher) EXPECT() *MockcacherMockRecorder

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

func (*Mockcacher) Get

func (m *Mockcacher) Get(key []byte) ([]byte, error)

Get mocks base method

func (*Mockcacher) Set

func (m *Mockcacher) Set(key, value []byte, expireSeconds int) error

Set mocks base method

type MockcacherMockRecorder

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

MockcacherMockRecorder is the mock recorder for Mockcacher

func (*MockcacherMockRecorder) Del

func (mr *MockcacherMockRecorder) Del(key interface{}) *gomock.Call

Del indicates an expected call of Del

func (*MockcacherMockRecorder) Get

func (mr *MockcacherMockRecorder) Get(key interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockcacherMockRecorder) Set

func (mr *MockcacherMockRecorder) Set(key, value, expireSeconds interface{}) *gomock.Call

Set indicates an expected call of Set

Jump to

Keyboard shortcuts

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