Documentation ¶
Index ¶
- Constants
- Variables
- func NewUuidContext(id xid.ID) uuidContext
- func StartMetrics(addr string, l logger.Logger, recordsCounter func() float64, ...) *http.Server
- 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) 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) CreateUser(ctx context.Context, r *schema.CreateUserRequest) (*schema.CreateUserResponse, error)
- func (s *ImmuServer) CurrentRoot(ctx context.Context, e *empty.Empty) (*schema.Root, error)
- func (s *ImmuServer) DeleteUser(ctx context.Context, r *schema.DeleteUserRequest) (*empty.Empty, 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(context.Context, *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.ItemList, error)
- func (s *ImmuServer) Login(ctx context.Context, r *schema.LoginRequest) (*schema.LoginResponse, 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) 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) WithLogger(logger logger.Logger) *ImmuServer
- func (s *ImmuServer) WithOptions(options Options) *ImmuServer
- func (s *ImmuServer) WithStore(st *store.Store) *ImmuServer
- 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 MTLsOptions
- type MetricsCollection
- type Options
- func (o Options) Bind() string
- func (o Options) MetricsBind() string
- func (o Options) String() string
- func (o Options) WithAddress(address string) Options
- func (o Options) WithAuth(authEnabled bool) Options
- func (o Options) WithConfig(config string) Options
- func (o Options) WithDbName(dbName string) Options
- func (o Options) WithDetached(detached bool) Options
- func (o Options) WithDir(dir string) 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) 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
- func (o Options) WithSysDbName(sysDbName string) Options
- type PIDFile
- type Service
- type UUIDContext
- type WrappedServerStream
Constants ¶
View Source
const IDENTIFIER_FNAME = "immudb.identifier"
IDENTIFIER_FNAME ...
View Source
const SERVER_UUID_HEADER = "immudb-uuid"
SERVER_UUID_HEADER ...
Variables ¶
View Source
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"}, ), }
Functions ¶
func NewUuidContext ¶
NewUuidContext return a new UUId context servive
Types ¶
type ImmuServer ¶
type ImmuServer struct { Store *store.Store SysStore *store.Store Logger logger.Logger Options Options GrpcServer *grpc.Server Pid PIDFile // contains filtered or unexported fields }
func DefaultServer ¶
func DefaultServer() *ImmuServer
func (*ImmuServer) ByIndexSV ¶
func (s *ImmuServer) ByIndexSV(ctx context.Context, index *schema.Index) (*schema.StructuredItem, error)
func (*ImmuServer) BySafeIndex ¶
func (s *ImmuServer) BySafeIndex(ctx context.Context, sio *schema.SafeIndexOptions) (*schema.SafeItem, error)
func (*ImmuServer) ChangePassword ¶
func (s *ImmuServer) ChangePassword(ctx context.Context, r *schema.ChangePasswordRequest) (*empty.Empty, error)
func (*ImmuServer) Consistency ¶
func (s *ImmuServer) Consistency(ctx context.Context, index *schema.Index) (*schema.ConsistencyProof, error)
func (*ImmuServer) Count ¶
func (s *ImmuServer) Count(ctx context.Context, prefix *schema.KeyPrefix) (*schema.ItemsCount, error)
func (*ImmuServer) CreateUser ¶
func (s *ImmuServer) CreateUser(ctx context.Context, r *schema.CreateUserRequest) (*schema.CreateUserResponse, error)
func (*ImmuServer) CurrentRoot ¶
func (*ImmuServer) DeleteUser ¶
func (s *ImmuServer) DeleteUser(ctx context.Context, r *schema.DeleteUserRequest) (*empty.Empty, error)
func (*ImmuServer) Dump ¶
func (s *ImmuServer) Dump(in *empty.Empty, stream schema.ImmuService_DumpServer) error
func (*ImmuServer) GetBatchSV ¶
func (s *ImmuServer) GetBatchSV(ctx context.Context, kl *schema.KeyList) (*schema.StructuredItemList, error)
func (*ImmuServer) GetSV ¶
func (s *ImmuServer) GetSV(ctx context.Context, k *schema.Key) (*schema.StructuredItem, error)
func (*ImmuServer) Health ¶
func (s *ImmuServer) Health(context.Context, *empty.Empty) (*schema.HealthResponse, error)
func (*ImmuServer) HistorySV ¶
func (s *ImmuServer) HistorySV(ctx context.Context, key *schema.Key) (*schema.StructuredItemList, error)
func (*ImmuServer) IScan ¶
func (s *ImmuServer) IScan(ctx context.Context, opts *schema.IScanOptions) (*schema.Page, error)
func (*ImmuServer) IScanSV ¶
func (s *ImmuServer) IScanSV(ctx context.Context, opts *schema.IScanOptions) (*schema.SPage, error)
func (*ImmuServer) Inclusion ¶
func (s *ImmuServer) Inclusion(ctx context.Context, index *schema.Index) (*schema.InclusionProof, error)
func (*ImmuServer) Login ¶
func (s *ImmuServer) Login(ctx context.Context, r *schema.LoginRequest) (*schema.LoginResponse, error)
func (*ImmuServer) Reference ¶
func (s *ImmuServer) Reference(ctx context.Context, refOpts *schema.ReferenceOptions) (index *schema.Index, err error)
func (*ImmuServer) SafeGet ¶
func (s *ImmuServer) SafeGet(ctx context.Context, opts *schema.SafeGetOptions) (*schema.SafeItem, error)
func (*ImmuServer) SafeGetSV ¶
func (s *ImmuServer) SafeGetSV(ctx context.Context, opts *schema.SafeGetOptions) (*schema.SafeStructuredItem, error)
func (*ImmuServer) SafeReference ¶
func (s *ImmuServer) SafeReference(ctx context.Context, safeRefOpts *schema.SafeReferenceOptions) (proof *schema.Proof, err error)
func (*ImmuServer) SafeSet ¶
func (s *ImmuServer) SafeSet(ctx context.Context, opts *schema.SafeSetOptions) (*schema.Proof, error)
func (*ImmuServer) SafeSetSV ¶
func (s *ImmuServer) SafeSetSV(ctx context.Context, sopts *schema.SafeSetSVOptions) (*schema.Proof, error)
func (*ImmuServer) SafeZAdd ¶
func (s *ImmuServer) SafeZAdd(ctx context.Context, opts *schema.SafeZAddOptions) (*schema.Proof, error)
func (*ImmuServer) Scan ¶
func (s *ImmuServer) Scan(ctx context.Context, opts *schema.ScanOptions) (*schema.ItemList, error)
func (*ImmuServer) ScanSV ¶
func (s *ImmuServer) ScanSV(ctx context.Context, opts *schema.ScanOptions) (*schema.StructuredItemList, error)
func (*ImmuServer) SetBatchSV ¶
func (*ImmuServer) SetSV ¶
func (s *ImmuServer) SetSV(ctx context.Context, skv *schema.StructuredKeyValue) (*schema.Index, error)
func (*ImmuServer) Start ¶
func (s *ImmuServer) Start() error
func (*ImmuServer) Stop ¶
func (s *ImmuServer) Stop() error
func (*ImmuServer) UpdateAuthConfig ¶
func (s *ImmuServer) UpdateAuthConfig(ctx context.Context, req *schema.AuthConfig) (*empty.Empty, error)
func (*ImmuServer) UpdateMTLSConfig ¶
func (s *ImmuServer) UpdateMTLSConfig(ctx context.Context, req *schema.MTLSConfig) (*empty.Empty, error)
func (*ImmuServer) WithLogger ¶
func (s *ImmuServer) WithLogger(logger logger.Logger) *ImmuServer
func (*ImmuServer) WithOptions ¶
func (s *ImmuServer) WithOptions(options Options) *ImmuServer
func (*ImmuServer) WithStore ¶
func (s *ImmuServer) WithStore(st *store.Store) *ImmuServer
func (*ImmuServer) ZAdd ¶
func (s *ImmuServer) ZAdd(ctx context.Context, opts *schema.ZAddOptions) (*schema.Index, error)
func (*ImmuServer) ZScan ¶
func (s *ImmuServer) ZScan(ctx context.Context, opts *schema.ZScanOptions) (*schema.ItemList, error)
func (*ImmuServer) ZScanSV ¶
func (s *ImmuServer) ZScanSV(ctx context.Context, opts *schema.ZScanOptions) (*schema.StructuredItemList, error)
type MTLsOptions ¶
func DefaultMTLsOptions ¶
func DefaultMTLsOptions() MTLsOptions
func (MTLsOptions) WithCertificate ¶
func (o MTLsOptions) WithCertificate(Certificate string) MTLsOptions
func (MTLsOptions) WithClientCAs ¶
func (o MTLsOptions) WithClientCAs(ClientCAs string) MTLsOptions
func (MTLsOptions) WithPkey ¶
func (o MTLsOptions) WithPkey(Pkey string) MTLsOptions
type MetricsCollection ¶
type MetricsCollection struct { RecordsCounter prometheus.CounterFunc UptimeCounter prometheus.CounterFunc RPCsPerClientCounters *prometheus.CounterVec LastMessageAtPerClientGauges *prometheus.GaugeVec }
func (*MetricsCollection) UpdateClientMetrics ¶
func (mc *MetricsCollection) UpdateClientMetrics(ctx context.Context)
func (*MetricsCollection) WithRecordsCounter ¶
func (mc *MetricsCollection) WithRecordsCounter(f func() float64)
func (*MetricsCollection) WithUptimeCounter ¶
func (mc *MetricsCollection) WithUptimeCounter(f func() float64)
type Options ¶
type Options struct { Dir string Network string Address string Port int MetricsPort int DbName string SysDbName string Config string Pidfile string Logfile string MTLs bool MTLsOptions MTLsOptions Auth bool NoHistograms bool Detached bool }
Options server options list
func (Options) MetricsBind ¶
MetricsBind return metrics bind address
func (Options) WithAddress ¶
WithAddress sets address
func (Options) WithConfig ¶
WithConfig sets config file name
func (Options) WithDbName ¶
WithDbName sets dbName
func (Options) WithDetached ¶
WithDetached sets immudb to be run in background
func (Options) WithLogfile ¶
WithLogfile sets logfile
func (Options) WithMTLsOptions ¶
func (o Options) WithMTLsOptions(MTLsOptions MTLsOptions) Options
WithMTLsOptions sets WithMTLsOptions
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
func (Options) WithSysDbName ¶
WithSysDbName sets SysDbName
type PIDFile ¶
type PIDFile struct {
// contains filtered or unexported fields
}
PIDFile contains path of pid file
type Service ¶
type Service struct {
ImmuServer
}
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 ...
Click to show internal directories.
Click to hide internal directories.