Documentation
¶
Index ¶
- Constants
- Variables
- func IsAllowedDbName(dbName string) error
- func NewUuidContext(id xid.ID) uuidContext
- func StartMetrics(addr string, l logger.Logger, recordsCounter func() float64, ...) *http.Server
- type CCOptions
- type CorruptionChecker
- type DatabaseList
- type Db
- func (d *Db) ByIndex(index *schema.Index) (*schema.Item, error)
- func (d *Db) ByIndexSV(index *schema.Index) (*schema.StructuredItem, error)
- func (d *Db) BySafeIndex(sio *schema.SafeIndexOptions) (*schema.SafeItem, error)
- func (d *Db) Consistency(index *schema.Index) (*schema.ConsistencyProof, error)
- func (d *Db) Count(prefix *schema.KeyPrefix) (*schema.ItemsCount, error)
- func (d *Db) CurrentRoot(e *empty.Empty) (*schema.Root, error)
- func (d *Db) Dump(in *empty.Empty, stream schema.ImmuService_DumpServer) error
- func (d *Db) Get(k *schema.Key) (*schema.Item, error)
- func (d *Db) GetBatch(kl *schema.KeyList) (*schema.ItemList, error)
- func (d *Db) GetBatchSV(kl *schema.KeyList) (*schema.StructuredItemList, error)
- func (d *Db) GetSV(k *schema.Key) (*schema.StructuredItem, error)
- func (d *Db) Health(*empty.Empty) (*schema.HealthResponse, error)
- func (d *Db) History(key *schema.Key) (*schema.ItemList, error)
- func (d *Db) HistorySV(key *schema.Key) (*schema.StructuredItemList, error)
- func (d *Db) IScan(opts *schema.IScanOptions) (*schema.Page, error)
- func (d *Db) IScanSV(opts *schema.IScanOptions) (*schema.SPage, error)
- func (d *Db) Inclusion(index *schema.Index) (*schema.InclusionProof, error)
- func (d *Db) PrintTree() *schema.Tree
- func (d *Db) Reference(refOpts *schema.ReferenceOptions) (index *schema.Index, err error)
- func (d *Db) SafeGet(opts *schema.SafeGetOptions) (*schema.SafeItem, error)
- func (d *Db) SafeGetSV(opts *schema.SafeGetOptions) (*schema.SafeStructuredItem, error)
- func (d *Db) SafeReference(safeRefOpts *schema.SafeReferenceOptions) (proof *schema.Proof, err error)
- func (d *Db) SafeSet(opts *schema.SafeSetOptions) (*schema.Proof, error)
- func (d *Db) SafeSetSV(sopts *schema.SafeSetSVOptions) (*schema.Proof, error)
- func (d *Db) SafeZAdd(opts *schema.SafeZAddOptions) (*schema.Proof, error)
- func (d *Db) Scan(opts *schema.ScanOptions) (*schema.ItemList, error)
- func (d *Db) ScanSV(opts *schema.ScanOptions) (*schema.StructuredItemList, error)
- func (d *Db) Set(kv *schema.KeyValue) (*schema.Index, error)
- func (d *Db) SetBatch(kvl *schema.KVList) (*schema.Index, error)
- func (d *Db) SetBatchSV(skvl *schema.SKVList) (*schema.Index, error)
- func (d *Db) SetSV(skv *schema.StructuredKeyValue) (*schema.Index, error)
- func (d *Db) ZAdd(opts *schema.ZAddOptions) (*schema.Index, error)
- func (d *Db) ZScan(opts *schema.ZScanOptions) (*schema.ItemList, error)
- func (d *Db) ZScanSV(opts *schema.ZScanOptions) (*schema.StructuredItemList, error)
- type DbOptions
- func (o *DbOptions) GetCorruptionChecker() bool
- func (o *DbOptions) GetDbName() string
- func (o *DbOptions) GetDbRootPath() string
- func (o *DbOptions) GetInMemoryStore() bool
- func (o *DbOptions) WithCorruptionChecker(cc bool) *DbOptions
- func (o *DbOptions) WithDbName(dbName string) *DbOptions
- func (o *DbOptions) WithDbRootPath(Path string) *DbOptions
- func (o *DbOptions) WithInMemoryStore(inmemory bool) *DbOptions
- type ImmuServer
- func (s *ImmuServer) ByIndex(ctx context.Context, index *schema.Index) (*schema.Item, error)
- func (s *ImmuServer) ByIndexSV(ctx context.Context, index *schema.Index) (*schema.StructuredItem, error)
- func (s *ImmuServer) BySafeIndex(ctx context.Context, sio *schema.SafeIndexOptions) (*schema.SafeItem, error)
- func (s *ImmuServer) ChangePassword(ctx context.Context, r *schema.ChangePasswordRequest) (*empty.Empty, error)
- func (s *ImmuServer) ChangePermission(ctx context.Context, r *schema.ChangePermissionRequest) (*empty.Empty, error)
- func (s *ImmuServer) CloseDatabases() error
- func (s *ImmuServer) Consistency(ctx context.Context, index *schema.Index) (*schema.ConsistencyProof, error)
- func (s *ImmuServer) Count(ctx context.Context, prefix *schema.KeyPrefix) (*schema.ItemsCount, error)
- func (s *ImmuServer) CreateDatabase(ctx context.Context, newdb *schema.Database) (*empty.Empty, error)
- func (s *ImmuServer) CreateUser(ctx context.Context, r *schema.CreateUserRequest) (*empty.Empty, error)
- func (s *ImmuServer) CurrentRoot(ctx context.Context, e *empty.Empty) (*schema.Root, error)
- func (s *ImmuServer) DatabaseList(ctx context.Context, req *empty.Empty) (*schema.DatabaseListResponse, error)
- func (s *ImmuServer) Dump(in *empty.Empty, stream schema.ImmuService_DumpServer) error
- func (s *ImmuServer) Get(ctx context.Context, k *schema.Key) (*schema.Item, error)
- func (s *ImmuServer) GetBatch(ctx context.Context, kl *schema.KeyList) (*schema.ItemList, error)
- func (s *ImmuServer) GetBatchSV(ctx context.Context, kl *schema.KeyList) (*schema.StructuredItemList, error)
- func (s *ImmuServer) GetSV(ctx context.Context, k *schema.Key) (*schema.StructuredItem, error)
- func (s *ImmuServer) Health(ctx context.Context, e *empty.Empty) (*schema.HealthResponse, error)
- func (s *ImmuServer) History(ctx context.Context, key *schema.Key) (*schema.ItemList, error)
- func (s *ImmuServer) HistorySV(ctx context.Context, key *schema.Key) (*schema.StructuredItemList, error)
- func (s *ImmuServer) IScan(ctx context.Context, opts *schema.IScanOptions) (*schema.Page, error)
- func (s *ImmuServer) IScanSV(ctx context.Context, opts *schema.IScanOptions) (*schema.SPage, error)
- func (s *ImmuServer) Inclusion(ctx context.Context, index *schema.Index) (*schema.InclusionProof, error)
- func (s *ImmuServer) ListUsers(ctx context.Context, req *empty.Empty) (*schema.UserList, error)
- func (s *ImmuServer) Login(ctx context.Context, r *schema.LoginRequest) (*schema.LoginResponse, error)
- func (s *ImmuServer) Logout(ctx context.Context, r *empty.Empty) (*empty.Empty, error)
- func (s *ImmuServer) PrintTree(ctx context.Context, r *empty.Empty) (*schema.Tree, error)
- func (s *ImmuServer) Reference(ctx context.Context, refOpts *schema.ReferenceOptions) (index *schema.Index, err error)
- func (s *ImmuServer) SafeGet(ctx context.Context, opts *schema.SafeGetOptions) (*schema.SafeItem, error)
- func (s *ImmuServer) SafeGetSV(ctx context.Context, opts *schema.SafeGetOptions) (*schema.SafeStructuredItem, error)
- func (s *ImmuServer) SafeReference(ctx context.Context, safeRefOpts *schema.SafeReferenceOptions) (proof *schema.Proof, err error)
- func (s *ImmuServer) SafeSet(ctx context.Context, opts *schema.SafeSetOptions) (*schema.Proof, error)
- func (s *ImmuServer) SafeSetSV(ctx context.Context, sopts *schema.SafeSetSVOptions) (*schema.Proof, error)
- func (s *ImmuServer) SafeZAdd(ctx context.Context, opts *schema.SafeZAddOptions) (*schema.Proof, error)
- func (s *ImmuServer) Scan(ctx context.Context, opts *schema.ScanOptions) (*schema.ItemList, error)
- func (s *ImmuServer) ScanSV(ctx context.Context, opts *schema.ScanOptions) (*schema.StructuredItemList, error)
- func (s *ImmuServer) Set(ctx context.Context, kv *schema.KeyValue) (*schema.Index, error)
- func (s *ImmuServer) SetActiveUser(ctx context.Context, r *schema.SetActiveUserRequest) (*empty.Empty, error)
- func (s *ImmuServer) SetBatch(ctx context.Context, kvl *schema.KVList) (*schema.Index, error)
- func (s *ImmuServer) SetBatchSV(ctx context.Context, skvl *schema.SKVList) (*schema.Index, error)
- func (s *ImmuServer) SetSV(ctx context.Context, skv *schema.StructuredKeyValue) (*schema.Index, error)
- func (s *ImmuServer) Start() error
- func (s *ImmuServer) Stop() error
- func (s *ImmuServer) UpdateAuthConfig(ctx context.Context, req *schema.AuthConfig) (*empty.Empty, error)
- func (s *ImmuServer) UpdateMTLSConfig(ctx context.Context, req *schema.MTLSConfig) (*empty.Empty, error)
- func (s *ImmuServer) UseDatabase(ctx context.Context, db *schema.Database) (*schema.UseDatabaseReply, error)
- func (s *ImmuServer) WithLogger(logger logger.Logger) ImmuServerIf
- func (s *ImmuServer) WithOptions(options Options) ImmuServerIf
- func (s *ImmuServer) ZAdd(ctx context.Context, opts *schema.ZAddOptions) (*schema.Index, error)
- func (s *ImmuServer) ZScan(ctx context.Context, opts *schema.ZScanOptions) (*schema.ItemList, error)
- func (s *ImmuServer) ZScanSV(ctx context.Context, opts *schema.ZScanOptions) (*schema.StructuredItemList, error)
- type ImmuServerIf
- type MTLsOptions
- type MetricsCollection
- type Options
- func (o Options) Bind() string
- func (o Options) GetAuth() bool
- func (o Options) GetDefaultDbName() string
- func (o Options) GetInMemoryStore() bool
- func (o Options) GetMaintenance() bool
- func (o Options) GetSystemAdminDbName() string
- func (o Options) MetricsBind() string
- func (o Options) String() string
- func (o Options) WithAddress(address string) Options
- func (o Options) WithAdminPassword(adminPassword string) Options
- func (o Options) WithAuth(authEnabled bool) Options
- func (o Options) WithConfig(config string) Options
- func (o Options) WithCorruptionCheck(corruptionCheck bool) Options
- func (o Options) WithDetached(detached bool) Options
- func (o Options) WithDevMode(devMode bool) Options
- func (o Options) WithDir(dir string) Options
- func (o Options) WithInMemoryStore(inmemory bool) Options
- func (o Options) WithListener(lis net.Listener) Options
- func (o Options) WithLogfile(logfile string) Options
- func (o Options) WithMTLs(MTLs bool) Options
- func (o Options) WithMTLsOptions(MTLsOptions MTLsOptions) Options
- func (o Options) WithMaintenance(m bool) Options
- func (o Options) WithMetricsServer(metricsServer bool) Options
- func (o Options) WithNetwork(network string) Options
- func (o Options) WithNoHistograms(noHistograms bool) Options
- func (o Options) WithPidfile(pidfile string) Options
- func (o Options) WithPort(port int) Options
- type PIDFile
- type RandomGenerator
- type Service
- type UUIDContext
- type WrappedServerStream
Constants ¶
const DefaultDbIndex = 0
DefaultDbIndex systemdb should always be in index 0
const DefaultdbName = "defaultdb"
const ErrConsistencyFail = "consistency check fail at index %d"
ErrConsistencyFail happens when a consistency check fails. Check the log to retrieve details on which element is failing
const IDENTIFIER_FNAME = "immudb.identifier"
IDENTIFIER_FNAME ...
const SERVER_UUID_HEADER = "immudb-uuid"
SERVER_UUID_HEADER ...
const SystemdbName = "systemdb"
Variables ¶
var Metrics = MetricsCollection{ RPCsPerClientCounters: promauto.NewCounterVec( prometheus.CounterOpts{ Namespace: metricsNamespace, Name: "number_of_rpcs_per_client", Help: "Number of handled RPCs per client.", }, []string{"ip"}, ), LastMessageAtPerClientGauges: promauto.NewGaugeVec( prometheus.GaugeOpts{ Namespace: metricsNamespace, Name: "clients_last_message_at_unix_seconds", Help: "Timestamp at which clients have sent their most recent message.", }, []string{"ip"}, ), }
Metrics immudb Prometheus metrics collection
Functions ¶
func IsAllowedDbName ¶ added in v0.7.0
IsAllowedDbName checks if the provided database name meets the requirements
func NewUuidContext ¶
NewUuidContext return a new UUId context servive
Types ¶
type CCOptions ¶ added in v0.7.0
type CCOptions struct {
// contains filtered or unexported fields
}
type CorruptionChecker ¶
CorruptionChecker corruption checker interface
func NewCorruptionChecker ¶
func NewCorruptionChecker(opt CCOptions, d DatabaseList, l logger.Logger, rg RandomGenerator) CorruptionChecker
NewCorruptionChecker returns new trust checker service
type DatabaseList ¶ added in v0.7.0
DatabaseList DatabaseList interface
func NewDatabaseList ¶ added in v0.7.0
func NewDatabaseList() DatabaseList
NewDatabaseList constructs a new database list
type Db ¶ added in v0.7.0
type Db struct {
Store *store.Store
Logger logger.Logger
// contains filtered or unexported fields
}
Db database instance
func (*Db) BySafeIndex ¶ added in v0.7.0
BySafeIndex ...
func (*Db) Consistency ¶ added in v0.7.0
Consistency ...
func (*Db) CurrentRoot ¶ added in v0.7.0
CurrentRoot ...
func (*Db) GetBatchSV ¶ added in v0.7.0
GetBatchSV ...
func (*Db) SafeGetSV ¶ added in v0.7.0
func (d *Db) SafeGetSV(opts *schema.SafeGetOptions) (*schema.SafeStructuredItem, error)
SafeGetSV ...
func (*Db) SafeReference ¶ added in v0.7.0
func (d *Db) SafeReference(safeRefOpts *schema.SafeReferenceOptions) (proof *schema.Proof, err error)
SafeReference ...
func (*Db) ScanSV ¶ added in v0.7.0
func (d *Db) ScanSV(opts *schema.ScanOptions) (*schema.StructuredItemList, error)
ScanSV ...
func (*Db) SetBatchSV ¶ added in v0.7.0
SetBatchSV ...
func (*Db) ZScanSV ¶ added in v0.7.0
func (d *Db) ZScanSV(opts *schema.ZScanOptions) (*schema.StructuredItemList, error)
ZScanSV ...
type DbOptions ¶ added in v0.7.0
type DbOptions struct {
// contains filtered or unexported fields
}
DbOptions database instance options
func DefaultOption ¶ added in v0.7.0
func DefaultOption() *DbOptions
DefaultOption Initialise Db Optionts to default values
func (*DbOptions) GetCorruptionChecker ¶ added in v0.7.0
GetCorruptionChecker returns if corruption checker should start for this database instance
func (*DbOptions) GetDbName ¶ added in v0.7.0
GetDbName Returns Database name which is also db instance directory
func (*DbOptions) GetDbRootPath ¶ added in v0.7.0
GetDbRootPath returns the directory in which this database resides
func (*DbOptions) GetInMemoryStore ¶ added in v0.7.0
GetInMemoryStore returns if we use in memory database without persistence
func (*DbOptions) WithCorruptionChecker ¶ added in v0.7.0
WithCorruptionChecker sets if corruption checker should start for this database instance
func (*DbOptions) WithDbName ¶ added in v0.7.0
WithDbName sets dbName, which is also db instance directory
func (*DbOptions) WithDbRootPath ¶ added in v0.7.0
WithDbRootPath sets the directory in which this database will reside
func (*DbOptions) WithInMemoryStore ¶ added in v0.7.0
WithInMemoryStore use in memory database without persistence, used for testing
type ImmuServer ¶
type ImmuServer struct {
OS immuos.OS
Logger logger.Logger
Options Options
GrpcServer *grpc.Server
Pid PIDFile
Cc CorruptionChecker
// contains filtered or unexported fields
}
ImmuServer ...
func (*ImmuServer) ByIndexSV ¶
func (s *ImmuServer) ByIndexSV(ctx context.Context, index *schema.Index) (*schema.StructuredItem, error)
ByIndexSV ...
func (*ImmuServer) BySafeIndex ¶
func (s *ImmuServer) BySafeIndex(ctx context.Context, sio *schema.SafeIndexOptions) (*schema.SafeItem, error)
BySafeIndex ...
func (*ImmuServer) ChangePassword ¶
func (s *ImmuServer) ChangePassword(ctx context.Context, r *schema.ChangePasswordRequest) (*empty.Empty, error)
ChangePassword ...
func (*ImmuServer) ChangePermission ¶ added in v0.7.0
func (s *ImmuServer) ChangePermission(ctx context.Context, r *schema.ChangePermissionRequest) (*empty.Empty, error)
ChangePermission grant or revoke user permissions on databases
func (*ImmuServer) CloseDatabases ¶ added in v0.7.0
func (s *ImmuServer) CloseDatabases() error
CloseDatabases closes all opened databases including the consinstency checker
func (*ImmuServer) Consistency ¶
func (s *ImmuServer) Consistency(ctx context.Context, index *schema.Index) (*schema.ConsistencyProof, error)
Consistency ...
func (*ImmuServer) Count ¶
func (s *ImmuServer) Count(ctx context.Context, prefix *schema.KeyPrefix) (*schema.ItemsCount, error)
Count ...
func (*ImmuServer) CreateDatabase ¶ added in v0.7.0
func (s *ImmuServer) CreateDatabase(ctx context.Context, newdb *schema.Database) (*empty.Empty, error)
CreateDatabase Create a new database instance
func (*ImmuServer) CreateUser ¶
func (s *ImmuServer) CreateUser(ctx context.Context, r *schema.CreateUserRequest) (*empty.Empty, error)
CreateUser Creates a new user
func (*ImmuServer) CurrentRoot ¶
CurrentRoot ...
func (*ImmuServer) DatabaseList ¶ added in v0.7.0
func (s *ImmuServer) DatabaseList(ctx context.Context, req *empty.Empty) (*schema.DatabaseListResponse, error)
DatabaseList returns a list of databases based on the requesting user permissins
func (*ImmuServer) Dump ¶
func (s *ImmuServer) Dump(in *empty.Empty, stream schema.ImmuService_DumpServer) error
Dump ...
func (*ImmuServer) GetBatchSV ¶
func (s *ImmuServer) GetBatchSV(ctx context.Context, kl *schema.KeyList) (*schema.StructuredItemList, error)
GetBatchSV ...
func (*ImmuServer) GetSV ¶
func (s *ImmuServer) GetSV(ctx context.Context, k *schema.Key) (*schema.StructuredItem, error)
GetSV ...
func (*ImmuServer) Health ¶
func (s *ImmuServer) Health(ctx context.Context, e *empty.Empty) (*schema.HealthResponse, error)
Health ...
func (*ImmuServer) HistorySV ¶
func (s *ImmuServer) HistorySV(ctx context.Context, key *schema.Key) (*schema.StructuredItemList, error)
HistorySV ...
func (*ImmuServer) IScan ¶
func (s *ImmuServer) IScan(ctx context.Context, opts *schema.IScanOptions) (*schema.Page, error)
IScan ...
func (*ImmuServer) IScanSV ¶
func (s *ImmuServer) IScanSV(ctx context.Context, opts *schema.IScanOptions) (*schema.SPage, error)
IScanSV ...
func (*ImmuServer) Inclusion ¶
func (s *ImmuServer) Inclusion(ctx context.Context, index *schema.Index) (*schema.InclusionProof, error)
Inclusion ...
func (*ImmuServer) ListUsers ¶
ListUsers returns a list of users based on the requesting user permissions
func (*ImmuServer) Login ¶
func (s *ImmuServer) Login(ctx context.Context, r *schema.LoginRequest) (*schema.LoginResponse, error)
Login ...
func (*ImmuServer) Reference ¶
func (s *ImmuServer) Reference(ctx context.Context, refOpts *schema.ReferenceOptions) (index *schema.Index, err error)
Reference ...
func (*ImmuServer) SafeGet ¶
func (s *ImmuServer) SafeGet(ctx context.Context, opts *schema.SafeGetOptions) (*schema.SafeItem, error)
SafeGet ...
func (*ImmuServer) SafeGetSV ¶
func (s *ImmuServer) SafeGetSV(ctx context.Context, opts *schema.SafeGetOptions) (*schema.SafeStructuredItem, error)
SafeGetSV ...
func (*ImmuServer) SafeReference ¶
func (s *ImmuServer) SafeReference(ctx context.Context, safeRefOpts *schema.SafeReferenceOptions) (proof *schema.Proof, err error)
SafeReference ...
func (*ImmuServer) SafeSet ¶
func (s *ImmuServer) SafeSet(ctx context.Context, opts *schema.SafeSetOptions) (*schema.Proof, error)
SafeSet ...
func (*ImmuServer) SafeSetSV ¶
func (s *ImmuServer) SafeSetSV(ctx context.Context, sopts *schema.SafeSetSVOptions) (*schema.Proof, error)
SafeSetSV ...
func (*ImmuServer) SafeZAdd ¶
func (s *ImmuServer) SafeZAdd(ctx context.Context, opts *schema.SafeZAddOptions) (*schema.Proof, error)
SafeZAdd ...
func (*ImmuServer) Scan ¶
func (s *ImmuServer) Scan(ctx context.Context, opts *schema.ScanOptions) (*schema.ItemList, error)
Scan ...
func (*ImmuServer) ScanSV ¶
func (s *ImmuServer) ScanSV(ctx context.Context, opts *schema.ScanOptions) (*schema.StructuredItemList, error)
ScanSV ...
func (*ImmuServer) SetActiveUser ¶ added in v0.7.0
func (s *ImmuServer) SetActiveUser(ctx context.Context, r *schema.SetActiveUserRequest) (*empty.Empty, error)
SetActiveUser activate or deactivate a user
func (*ImmuServer) SetBatchSV ¶
SetBatchSV ...
func (*ImmuServer) SetSV ¶
func (s *ImmuServer) SetSV(ctx context.Context, skv *schema.StructuredKeyValue) (*schema.Index, error)
SetSV ...
func (*ImmuServer) Start ¶
func (s *ImmuServer) Start() error
Start starts the immudb server Loads and starts the System DB, default db and user db
func (*ImmuServer) UpdateAuthConfig ¶
func (s *ImmuServer) UpdateAuthConfig(ctx context.Context, req *schema.AuthConfig) (*empty.Empty, error)
UpdateAuthConfig ...
func (*ImmuServer) UpdateMTLSConfig ¶
func (s *ImmuServer) UpdateMTLSConfig(ctx context.Context, req *schema.MTLSConfig) (*empty.Empty, error)
UpdateMTLSConfig ...
func (*ImmuServer) UseDatabase ¶ added in v0.7.0
func (s *ImmuServer) UseDatabase(ctx context.Context, db *schema.Database) (*schema.UseDatabaseReply, error)
UseDatabase ...
func (*ImmuServer) WithLogger ¶
func (s *ImmuServer) WithLogger(logger logger.Logger) ImmuServerIf
WithLogger ...
func (*ImmuServer) WithOptions ¶
func (s *ImmuServer) WithOptions(options Options) ImmuServerIf
WithOptions ...
func (*ImmuServer) ZAdd ¶
func (s *ImmuServer) ZAdd(ctx context.Context, opts *schema.ZAddOptions) (*schema.Index, error)
ZAdd ...
func (*ImmuServer) ZScan ¶
func (s *ImmuServer) ZScan(ctx context.Context, opts *schema.ZScanOptions) (*schema.ItemList, error)
ZScan ...
func (*ImmuServer) ZScanSV ¶
func (s *ImmuServer) ZScanSV(ctx context.Context, opts *schema.ZScanOptions) (*schema.StructuredItemList, error)
ZScanSV ...
type ImmuServerIf ¶ added in v0.7.0
type ImmuServerIf interface {
Start() error
Stop() error
WithOptions(options Options) ImmuServerIf
WithLogger(logger.Logger) ImmuServerIf
}
type MTLsOptions ¶
MTLsOptions ...
func (MTLsOptions) WithCertificate ¶
func (o MTLsOptions) WithCertificate(Certificate string) MTLsOptions
WithCertificate ...
func (MTLsOptions) WithClientCAs ¶
func (o MTLsOptions) WithClientCAs(ClientCAs string) MTLsOptions
WithClientCAs ...
type MetricsCollection ¶
type MetricsCollection struct {
RecordsCounter prometheus.CounterFunc
UptimeCounter prometheus.CounterFunc
RPCsPerClientCounters *prometheus.CounterVec
LastMessageAtPerClientGauges *prometheus.GaugeVec
}
MetricsCollection immudb Prometheus metrics collection
func (*MetricsCollection) UpdateClientMetrics ¶
func (mc *MetricsCollection) UpdateClientMetrics(ctx context.Context)
UpdateClientMetrics ...
func (*MetricsCollection) WithRecordsCounter ¶
func (mc *MetricsCollection) WithRecordsCounter(f func() float64)
WithRecordsCounter ...
func (*MetricsCollection) WithUptimeCounter ¶
func (mc *MetricsCollection) WithUptimeCounter(f func() float64)
WithUptimeCounter ...
type Options ¶
type Options struct {
Dir string
Network string
Address string
Port int
MetricsPort int
Config string
Pidfile string
Logfile string
MTLs bool
MTLsOptions MTLsOptions
NoHistograms bool
Detached bool
CorruptionCheck bool
MetricsServer bool
DevMode bool
AdminPassword string `json:"-"`
// contains filtered or unexported fields
}
Options server options list
func (Options) GetDefaultDbName ¶ added in v0.7.0
GetDefaultDbName returns the default database name
func (Options) GetInMemoryStore ¶ added in v0.7.0
GetInMemoryStore returns if we use in memory database without persistence , used for tests
func (Options) GetMaintenance ¶ added in v0.7.0
GetMaintenance gets maintenance mode
func (Options) GetSystemAdminDbName ¶ added in v0.7.0
GetSystemAdminDbName returns the System database name
func (Options) MetricsBind ¶
MetricsBind return metrics bind address
func (Options) WithAddress ¶
WithAddress sets address
func (Options) WithAdminPassword ¶ added in v0.6.2
WithAdminPassword ...
func (Options) WithConfig ¶
WithConfig sets config file name
func (Options) WithCorruptionCheck ¶
WithCorruptionCheck enable corruption check
func (Options) WithDetached ¶
WithDetached sets immudb to be run in background
func (Options) WithDevMode ¶ added in v0.6.2
WithDevMode ...
func (Options) WithInMemoryStore ¶ added in v0.7.0
WithInMemoryStore use in memory database without persistence, used for tests
func (Options) WithListener ¶ added in v0.7.0
WithListener used usually to pass a bufered listener for testing purposes
func (Options) WithLogfile ¶
WithLogfile sets logfile
func (Options) WithMTLsOptions ¶
func (o Options) WithMTLsOptions(MTLsOptions MTLsOptions) Options
WithMTLsOptions sets WithMTLsOptions
func (Options) WithMaintenance ¶ added in v0.7.0
WithMaintenance sets maintenance mode
func (Options) WithMetricsServer ¶
WithMetricsServer ...
func (Options) WithNetwork ¶
WithNetwork sets network
func (Options) WithNoHistograms ¶
WithNoHistograms disables collection of histograms metrics (e.g. query durations)
func (Options) WithPidfile ¶
WithPidfile sets pid file
type PIDFile ¶
PIDFile contains path of pid file
type RandomGenerator ¶ added in v0.7.0
type RandomGenerator interface {
// contains filtered or unexported methods
}
type UUIDContext ¶
type UUIDContext interface {
UuidStreamContextSetter(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
UuidContextSetter(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
}
UUIDContext manage UUID context
type WrappedServerStream ¶
type WrappedServerStream struct {
grpc.ServerStream
}
WrappedServerStream ...
func (*WrappedServerStream) RecvMsg ¶
func (w *WrappedServerStream) RecvMsg(m interface{}) error
RecvMsg ...
func (*WrappedServerStream) SendMsg ¶
func (w *WrappedServerStream) SendMsg(m interface{}) error
SendMsg ...