Documentation ¶
Index ¶
- Variables
- type CompletedConfig
- type Config
- type LevelDB
- func (*LevelDB) Descriptor() ([]byte, []int)deprecated
- func (x *LevelDB) GetCacheInMb() int32
- func (x *LevelDB) GetMaxParallelConsumers() int32
- func (x *LevelDB) GetPathPrefix() string
- func (x *LevelDB) GetPoolSize() int32
- func (*LevelDB) ProtoMessage()
- func (x *LevelDB) ProtoReflect() protoreflect.Message
- func (x *LevelDB) Reset()
- func (x *LevelDB) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_levedb_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CompletedConfig ¶
type CompletedConfig struct {
// contains filtered or unexported fields
}
func (CompletedConfig) New ¶
func (c CompletedConfig) New() (*leveldb.ConsistentDB, error)
New creates a new server which logically combines the handling chain with the passed server. name is used to differentiate for logging. The handler chain in particular can be difficult as it starts delgating. New usually called after Complete
type Config ¶
type Config struct { Proto LevelDB Validator *validator.Validate // contains filtered or unexported fields }
func NewViperConfig ¶
NewViperConfig returns a Config struct with the global viper instance key representing a sub tree of this instance. NewViperConfig is case-insensitive for a key.
func (*Config) Complete ¶
func (c *Config) Complete() CompletedConfig
Complete fills in any fields not set that are required to have valid data and can be derived from other fields. If you're going to ApplyOptions, do that first. It's mutating the receiver. ApplyOptions is called inside.
type LevelDB ¶
type LevelDB struct { PathPrefix string `protobuf:"bytes,1,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"` // leveldb路径前缀 CacheInMb int32 `protobuf:"varint,2,opt,name=cache_in_mb,json=cacheInMb,proto3" json:"cache_in_mb,omitempty"` // 每个leveldb数据库的内存cache,单位MiB,0则使用默认值 PoolSize int32 `protobuf:"varint,3,opt,name=pool_size,json=poolSize,proto3" json:"pool_size,omitempty"` // leveldb文件个数,一致性哈希算法进行负载,提高并发性能 MaxParallelConsumers int32 `protobuf:"varint,4,opt,name=max_parallel_consumers,json=maxParallelConsumers,proto3" json:"max_parallel_consumers,omitempty"` // leveldb并行消费消费者个数 // contains filtered or unexported fields }
func (*LevelDB) Descriptor
deprecated
func (*LevelDB) GetCacheInMb ¶
func (*LevelDB) GetMaxParallelConsumers ¶
func (*LevelDB) GetPathPrefix ¶
func (*LevelDB) GetPoolSize ¶
func (*LevelDB) ProtoMessage ¶
func (*LevelDB) ProtoMessage()
func (*LevelDB) ProtoReflect ¶
func (x *LevelDB) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.