server

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 45 Imported by: 4

Documentation

Index

Constants

View Source
const DefaultDbIndex = 0

DefaultDbIndex systemdb should always be in index 0

View Source
const DefaultdbName = "defaultdb"
View Source
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

View Source
const IDENTIFIER_FNAME = "immudb.identifier"

IDENTIFIER_FNAME ...

View Source
const SERVER_UUID_HEADER = "immudb-uuid"

SERVER_UUID_HEADER ...

View Source
const SystemdbName = "systemdb"

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"},
	),
}

Metrics immudb Prometheus metrics collection

Functions

func IsAllowedDbName added in v0.7.0

func IsAllowedDbName(dbName string) error

IsAllowedDbName checks if the provided database name meets the requirements

func NewUuidContext

func NewUuidContext(id xid.ID) uuidContext

NewUuidContext return a new UUId context servive

func StartMetrics

func StartMetrics(
	addr string,
	l logger.Logger,
	recordsCounter func() float64,
	uptimeCounter func() float64,
) *http.Server

StartMetrics listens and servers the HTTP metrics server in a new goroutine. The server is then returned and can be stopped using Close().

Types

type CCOptions added in v0.7.0

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

type CorruptionChecker

type CorruptionChecker interface {
	Start(context.Context) (err error)
	Stop()
	GetStatus() bool
}

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

type DatabaseList interface {
	Append(database *Db)
	GetByIndex(index int64) *Db
	Length() int
}

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 NewDb added in v0.7.0

func NewDb(op *DbOptions, log logger.Logger) (*Db, error)

NewDb Creates a new Database along with it's directories and files

func OpenDb added in v0.7.0

func OpenDb(op *DbOptions, log logger.Logger) (*Db, error)

OpenDb Opens an existing Database from disk

func (*Db) ByIndex added in v0.7.0

func (d *Db) ByIndex(index *schema.Index) (*schema.Item, error)

ByIndex ...

func (*Db) ByIndexSV added in v0.7.0

func (d *Db) ByIndexSV(index *schema.Index) (*schema.StructuredItem, error)

ByIndexSV ...

func (*Db) BySafeIndex added in v0.7.0

func (d *Db) BySafeIndex(sio *schema.SafeIndexOptions) (*schema.SafeItem, error)

BySafeIndex ...

func (*Db) Consistency added in v0.7.0

func (d *Db) Consistency(index *schema.Index) (*schema.ConsistencyProof, error)

Consistency ...

func (*Db) Count added in v0.7.0

func (d *Db) Count(prefix *schema.KeyPrefix) (*schema.ItemsCount, error)

Count ...

func (*Db) CurrentRoot added in v0.7.0

func (d *Db) CurrentRoot(e *empty.Empty) (*schema.Root, error)

CurrentRoot ...

func (*Db) Dump added in v0.7.0

func (d *Db) Dump(in *empty.Empty, stream schema.ImmuService_DumpServer) error

Dump ...

func (*Db) Get added in v0.7.0

func (d *Db) Get(k *schema.Key) (*schema.Item, error)

Get ...

func (*Db) GetBatch added in v0.7.0

func (d *Db) GetBatch(kl *schema.KeyList) (*schema.ItemList, error)

GetBatch ...

func (*Db) GetBatchSV added in v0.7.0

func (d *Db) GetBatchSV(kl *schema.KeyList) (*schema.StructuredItemList, error)

GetBatchSV ...

func (*Db) GetSV added in v0.7.0

func (d *Db) GetSV(k *schema.Key) (*schema.StructuredItem, error)

GetSV ...

func (*Db) Health added in v0.7.0

func (d *Db) Health(*empty.Empty) (*schema.HealthResponse, error)

Health ...

func (*Db) History added in v0.7.0

func (d *Db) History(key *schema.Key) (*schema.ItemList, error)

History ...

func (*Db) HistorySV added in v0.7.0

func (d *Db) HistorySV(key *schema.Key) (*schema.StructuredItemList, error)

HistorySV ...

func (*Db) IScan added in v0.7.0

func (d *Db) IScan(opts *schema.IScanOptions) (*schema.Page, error)

IScan ...

func (*Db) IScanSV added in v0.7.0

func (d *Db) IScanSV(opts *schema.IScanOptions) (*schema.SPage, error)

IScanSV ...

func (*Db) Inclusion added in v0.7.0

func (d *Db) Inclusion(index *schema.Index) (*schema.InclusionProof, error)

Inclusion ...

func (*Db) PrintTree added in v0.7.0

func (d *Db) PrintTree() *schema.Tree

PrintTree ...

func (*Db) Reference added in v0.7.0

func (d *Db) Reference(refOpts *schema.ReferenceOptions) (index *schema.Index, err error)

Reference ...

func (*Db) SafeGet added in v0.7.0

func (d *Db) SafeGet(opts *schema.SafeGetOptions) (*schema.SafeItem, error)

SafeGet ...

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) SafeSet added in v0.7.0

func (d *Db) SafeSet(opts *schema.SafeSetOptions) (*schema.Proof, error)

SafeSet ...

func (*Db) SafeSetSV added in v0.7.0

func (d *Db) SafeSetSV(sopts *schema.SafeSetSVOptions) (*schema.Proof, error)

SafeSetSV ...

func (*Db) SafeZAdd added in v0.7.0

func (d *Db) SafeZAdd(opts *schema.SafeZAddOptions) (*schema.Proof, error)

SafeZAdd ...

func (*Db) Scan added in v0.7.0

func (d *Db) Scan(opts *schema.ScanOptions) (*schema.ItemList, error)

Scan ...

func (*Db) ScanSV added in v0.7.0

func (d *Db) ScanSV(opts *schema.ScanOptions) (*schema.StructuredItemList, error)

ScanSV ...

func (*Db) Set added in v0.7.0

func (d *Db) Set(kv *schema.KeyValue) (*schema.Index, error)

Set ...

func (*Db) SetBatch added in v0.7.0

func (d *Db) SetBatch(kvl *schema.KVList) (*schema.Index, error)

SetBatch ...

func (*Db) SetBatchSV added in v0.7.0

func (d *Db) SetBatchSV(skvl *schema.SKVList) (*schema.Index, error)

SetBatchSV ...

func (*Db) SetSV added in v0.7.0

func (d *Db) SetSV(skv *schema.StructuredKeyValue) (*schema.Index, error)

SetSV ...

func (*Db) ZAdd added in v0.7.0

func (d *Db) ZAdd(opts *schema.ZAddOptions) (*schema.Index, error)

ZAdd ...

func (*Db) ZScan added in v0.7.0

func (d *Db) ZScan(opts *schema.ZScanOptions) (*schema.ItemList, error)

ZScan ...

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

func (o *DbOptions) GetCorruptionChecker() bool

GetCorruptionChecker returns if corruption checker should start for this database instance

func (*DbOptions) GetDbName added in v0.7.0

func (o *DbOptions) GetDbName() string

GetDbName Returns Database name which is also db instance directory

func (*DbOptions) GetDbRootPath added in v0.7.0

func (o *DbOptions) GetDbRootPath() string

GetDbRootPath returns the directory in which this database resides

func (*DbOptions) GetInMemoryStore added in v0.7.0

func (o *DbOptions) GetInMemoryStore() bool

GetInMemoryStore returns if we use in memory database without persistence

func (*DbOptions) WithCorruptionChecker added in v0.7.0

func (o *DbOptions) WithCorruptionChecker(cc bool) *DbOptions

WithCorruptionChecker sets if corruption checker should start for this database instance

func (*DbOptions) WithDbName added in v0.7.0

func (o *DbOptions) WithDbName(dbName string) *DbOptions

WithDbName sets dbName, which is also db instance directory

func (*DbOptions) WithDbRootPath added in v0.7.0

func (o *DbOptions) WithDbRootPath(Path string) *DbOptions

WithDbRootPath sets the directory in which this database will reside

func (*DbOptions) WithInMemoryStore added in v0.7.0

func (o *DbOptions) WithInMemoryStore(inmemory bool) *DbOptions

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 DefaultServer

func DefaultServer() *ImmuServer

DefaultServer ...

func (*ImmuServer) ByIndex

func (s *ImmuServer) ByIndex(ctx context.Context, index *schema.Index) (*schema.Item, error)

ByIndex ...

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

func (s *ImmuServer) CurrentRoot(ctx context.Context, e *empty.Empty) (*schema.Root, error)

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

Dump ...

func (*ImmuServer) Get

func (s *ImmuServer) Get(ctx context.Context, k *schema.Key) (*schema.Item, error)

Get ...

func (*ImmuServer) GetBatch

func (s *ImmuServer) GetBatch(ctx context.Context, kl *schema.KeyList) (*schema.ItemList, error)

GetBatch ...

func (*ImmuServer) GetBatchSV

func (s *ImmuServer) GetBatchSV(ctx context.Context, kl *schema.KeyList) (*schema.StructuredItemList, error)

GetBatchSV ...

func (*ImmuServer) GetSV

GetSV ...

func (*ImmuServer) Health

Health ...

func (*ImmuServer) History

func (s *ImmuServer) History(ctx context.Context, key *schema.Key) (*schema.ItemList, error)

History ...

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

func (s *ImmuServer) ListUsers(ctx context.Context, req *empty.Empty) (*schema.UserList, error)

ListUsers returns a list of users based on the requesting user permissions

func (*ImmuServer) Login

Login ...

func (*ImmuServer) Logout added in v0.6.1

func (s *ImmuServer) Logout(ctx context.Context, r *empty.Empty) (*empty.Empty, error)

Logout ...

func (*ImmuServer) PrintTree added in v0.6.1

func (s *ImmuServer) PrintTree(ctx context.Context, r *empty.Empty) (*schema.Tree, error)

PrintTree ...

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

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

ScanSV ...

func (*ImmuServer) Set

func (s *ImmuServer) Set(ctx context.Context, kv *schema.KeyValue) (*schema.Index, error)

Set ...

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) SetBatch

func (s *ImmuServer) SetBatch(ctx context.Context, kvl *schema.KVList) (*schema.Index, error)

SetBatch ...

func (*ImmuServer) SetBatchSV

func (s *ImmuServer) SetBatchSV(ctx context.Context, skvl *schema.SKVList) (*schema.Index, error)

SetBatchSV ...

func (*ImmuServer) SetSV

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) Stop

func (s *ImmuServer) Stop() error

Stop stops the immudb server

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

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

type MTLsOptions struct {
	Pkey        string
	Certificate string
	ClientCAs   string
}

MTLsOptions ...

func DefaultMTLsOptions

func DefaultMTLsOptions() MTLsOptions

DefaultMTLsOptions ...

func (MTLsOptions) WithCertificate

func (o MTLsOptions) WithCertificate(Certificate string) MTLsOptions

WithCertificate ...

func (MTLsOptions) WithClientCAs

func (o MTLsOptions) WithClientCAs(ClientCAs string) MTLsOptions

WithClientCAs ...

func (MTLsOptions) WithPkey

func (o MTLsOptions) WithPkey(Pkey string) MTLsOptions

WithPkey ...

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 DefaultOptions

func DefaultOptions() Options

DefaultOptions returns default server options

func (Options) Bind

func (o Options) Bind() string

Bind returns bind address

func (Options) GetAuth added in v0.7.0

func (o Options) GetAuth() bool

GetAuth gets auth

func (Options) GetDefaultDbName added in v0.7.0

func (o Options) GetDefaultDbName() string

GetDefaultDbName returns the default database name

func (Options) GetInMemoryStore added in v0.7.0

func (o Options) GetInMemoryStore() bool

GetInMemoryStore returns if we use in memory database without persistence , used for tests

func (Options) GetMaintenance added in v0.7.0

func (o Options) GetMaintenance() bool

GetMaintenance gets maintenance mode

func (Options) GetSystemAdminDbName added in v0.7.0

func (o Options) GetSystemAdminDbName() string

GetSystemAdminDbName returns the System database name

func (Options) MetricsBind

func (o Options) MetricsBind() string

MetricsBind return metrics bind address

func (Options) String

func (o Options) String() string

String print options

func (Options) WithAddress

func (o Options) WithAddress(address string) Options

WithAddress sets address

func (Options) WithAdminPassword added in v0.6.2

func (o Options) WithAdminPassword(adminPassword string) Options

WithAdminPassword ...

func (Options) WithAuth

func (o Options) WithAuth(authEnabled bool) Options

WithAuth sets auth

func (Options) WithConfig

func (o Options) WithConfig(config string) Options

WithConfig sets config file name

func (Options) WithCorruptionCheck

func (o Options) WithCorruptionCheck(corruptionCheck bool) Options

WithCorruptionCheck enable corruption check

func (Options) WithDetached

func (o Options) WithDetached(detached bool) Options

WithDetached sets immudb to be run in background

func (Options) WithDevMode added in v0.6.2

func (o Options) WithDevMode(devMode bool) Options

WithDevMode ...

func (Options) WithDir

func (o Options) WithDir(dir string) Options

WithDir sets dir

func (Options) WithInMemoryStore added in v0.7.0

func (o Options) WithInMemoryStore(inmemory bool) Options

WithInMemoryStore use in memory database without persistence, used for tests

func (Options) WithListener added in v0.7.0

func (o Options) WithListener(lis net.Listener) Options

WithListener used usually to pass a bufered listener for testing purposes

func (Options) WithLogfile

func (o Options) WithLogfile(logfile string) Options

WithLogfile sets logfile

func (Options) WithMTLs

func (o Options) WithMTLs(MTLs bool) Options

WithMTLs sets mtls

func (Options) WithMTLsOptions

func (o Options) WithMTLsOptions(MTLsOptions MTLsOptions) Options

WithMTLsOptions sets WithMTLsOptions

func (Options) WithMaintenance added in v0.7.0

func (o Options) WithMaintenance(m bool) Options

WithMaintenance sets maintenance mode

func (Options) WithMetricsServer

func (o Options) WithMetricsServer(metricsServer bool) Options

WithMetricsServer ...

func (Options) WithNetwork

func (o Options) WithNetwork(network string) Options

WithNetwork sets network

func (Options) WithNoHistograms

func (o Options) WithNoHistograms(noHistograms bool) Options

WithNoHistograms disables collection of histograms metrics (e.g. query durations)

func (Options) WithPidfile

func (o Options) WithPidfile(pidfile string) Options

WithPidfile sets pid file

func (Options) WithPort

func (o Options) WithPort(port int) Options

WithPort sets port

type PIDFile

type PIDFile struct {
	OS immuos.OS
	// contains filtered or unexported fields
}

PIDFile contains path of pid file

func NewPid

func NewPid(path string, OS immuos.OS) (PIDFile, error)

NewPid returns a new PIDFile or an error

func (PIDFile) Remove

func (file PIDFile) Remove() error

Remove remove the pid file

type RandomGenerator added in v0.7.0

type RandomGenerator interface {
	// contains filtered or unexported methods
}

type Service

type Service struct {
	ImmuServerIf
}

Service ...

func (Service) Run

func (s Service) Run()

Run - blocking run service

func (Service) Start

func (s Service) Start()

Start - non-blocking start service

func (Service) Stop

func (s Service) Stop()

Stop - non-blocking stop service

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 ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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