stm

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package stm impl jsonstore stm with etcd concurrency package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONStoreSTM

type JSONStoreSTM interface {
	NewSTM(f func(stm JSONStoreSTMOP) error) error
}

JSONStoreSTM 包括了实现STM所需的接口

type JSONStoreSTMImpl

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

JSONStoreSTMImpl 实现了 stm operations

func (*JSONStoreSTMImpl) Get

func (j *JSONStoreSTMImpl) Get(key string, object interface{}) error

Get 作用与JSONStore.Get 相同,在STM中使用

func (*JSONStoreSTMImpl) Put

func (j *JSONStoreSTMImpl) Put(key string, object interface{}) error

Put 作用与 JSONStore.Put 相同,在 STM 中使用

func (*JSONStoreSTMImpl) Remove

func (j *JSONStoreSTMImpl) Remove(key string)

Remove 作用与 JSONStore.Remove 相同,在 STM 中使用

type JSONStoreSTMOP

type JSONStoreSTMOP interface {
	Get(key string, object interface{}) error
	Put(key string, object interface{}) error
	Remove(key string)
}

JSONStoreSTMOP 包括了在 STM 中能使用的 API

type JSONStoreWithSTMImpl

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

JSONStoreWithSTMImpl 实现 STM

func NewJSONStoreWithSTMImpl

func NewJSONStoreWithSTMImpl(client *clientv3.Client) JSONStoreWithSTMImpl

NewJSONStoreWithSTMImpl 创建 JSONStoreWithSTMImpl

func (*JSONStoreWithSTMImpl) NewSTM

func (j *JSONStoreWithSTMImpl) NewSTM(f func(stm JSONStoreSTMOP) error) error

NewSTM 创建 STM

Jump to

Keyboard shortcuts

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