Documentation
¶
Index ¶
Constants ¶
View Source
const ( REMOTE Mode = "remote" LOCAL Mode = "local" MEMORY DataStoreType = "memory" // DEFAULT sets the concurrent optimization level to 0, which means that // when a write conflict occurs, one transaction will success DEFAULT int = 0 // PARALLELIZE_ON_UPDATE sets the concurrent optimization level to 1, which // means there is NO guarantee that any transaction will success when a write // conflict happens in a single datastore PARALLELIZE_ON_UPDATE int = 1 // PARALLELIZE_ON_PREPARE sets the concurrent optimization level to 2, which // means there is NO guarantee that any transaction will success when a write // conflict happens in different datastores PARALLELIZE_ON_PREPARE int = 2 // AsyncLevelZero means no async commit AsyncLevelZero int = 0 // AsyncLevelOne means async delete the TSR after return AsyncLevelOne int = 1 // AsyncLevelTwo means async ds.Commit() and delete the TSR after return AsyncLevelTwo int = 2 Pessimistic ReadStrategy = "pessimistic" AssumeCommit ReadStrategy = "commit" AssumeAbort ReadStrategy = "abort" )
Variables ¶
View Source
var Config = config{ LeaseTime: 1000 * time.Millisecond, MaxRecordLength: 2, IdGenerator: generator.NewUUIDGenerator(), Serializer: serializer.NewJSONSerializer(), LogLevel: zapcore.InfoLevel, ConcurrentOptimizationLevel: DEFAULT, AsyncLevel: AsyncLevelZero, MaxOutstandingRequest: 5, ReadStrategy: Pessimistic, }
View Source
var Debug = debug{ DebugMode: false, CherryGarciaMode: false, HTTPAdditionalLatency: 0, ConnAdditionalLatency: 0, }
Functions ¶
This section is empty.
Types ¶
type DataStoreType ¶
type DataStoreType string
type ReadStrategy ¶
type ReadStrategy string
Click to show internal directories.
Click to hide internal directories.