pool

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool interface {
	// GetTask get a task from pool
	GetTask() (*Task, error)
	// PutTask put a task into pool
	PutTask(task *Task) error
	// GetTaskNum get the number of tasks in the pool
	GetTaskNum() int
}

Pool is a connection pool interface

type Task

type Task struct {
	// type of task
	Type int    // 0: read, 1: write, 2: delete, 3: update
	Key  []byte // key of task
	Val  []byte // value of task
}

Jump to

Keyboard shortcuts

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