Documentation ¶
Overview ¶
Package mnemosyned is server implementation of Mnemosyne session store.
Index ¶
Constants ¶
View Source
const ( // DefaultTTL is session time to live default value. DefaultTTL = 24 * time.Minute // DefaultTTC is time to clear default value. DefaultTTC = 1 * time.Minute // DefaultCacheSize determines how big cache should be at the beginning. DefaultCacheSize = 100000 )
View Source
const ( // StorageEngineInMemory is not implemented yet. StorageEngineInMemory = "in_memory" // StorageEnginePostgres keeps session within postgres database. StorageEnginePostgres = "postgres" // StorageEngineRedis is not implemented yet. StorageEngineRedis = "redis" )
Variables ¶
This section is empty.
Functions ¶
func TestDaemon ¶
TestDaemon returns address of fully started in-memory daemon and closer to close it.
Types ¶
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
Daemon represents single daemon instance that can be run.
func NewDaemon ¶
func NewDaemon(opts *DaemonOpts) (*Daemon, error)
NewDaemon allocates new daemon instance using given options.
type DaemonOpts ¶
type DaemonOpts struct { IsTest bool SessionTTL time.Duration SessionTTC time.Duration Monitoring bool TLS bool TLSCertFile string TLSKeyFile string Storage string PostgresAddress string PostgresTable string PostgresSchema string Logger *zap.Logger RPCOptions []grpc.ServerOption RPCListener net.Listener DebugListener net.Listener ClusterListenAddr string ClusterSeeds []string }
DaemonOpts it is constructor argument that can be passed to the NewDaemon constructor function.
type TestDaemonOpts ¶
type TestDaemonOpts struct {
StoragePostgresAddress string
}
TestDaemonOpts set of options that are used with TestDaemon instance.
Source Files ¶
- backpack.go
- cache.go
- daemon.go
- doc.go
- error.go
- health.go
- monitoring.go
- postgres_storage.go
- random.go
- service.go
- session_manager.go
- session_manager_abandon.go
- session_manager_delete.go
- session_manager_exists.go
- session_manager_get.go
- session_manager_list.go
- session_manager_set_value.go
- session_manager_start.go
- storage.go
Click to show internal directories.
Click to hide internal directories.