Documentation ¶
Index ¶
- Constants
- Variables
- func TestStorage_Abandon(t *testing.T, s Storage)
- func TestStorage_Delete(t *testing.T, s Storage)
- func TestStorage_Exists(t *testing.T, s Storage)
- func TestStorage_Get(t *testing.T, s Storage)
- func TestStorage_List(t *testing.T, s Storage)
- func TestStorage_List_between(t *testing.T, s Storage)
- func TestStorage_SetValue(t *testing.T, s Storage)
- func TestStorage_Start(t *testing.T, s Storage)
- type InstrumentedStorage
- type Storage
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 )
View Source
const ( // EngineInMemory is not implemented yet. EngineInMemory = "in_memory" // EnginePostgres keeps session within postgres database. EnginePostgres = "postgres" // EngineRedis is not implemented yet. EngineRedis = "redis" )
Variables ¶
Functions ¶
func TestStorage_Abandon ¶
func TestStorage_Delete ¶
func TestStorage_Exists ¶
func TestStorage_Get ¶
func TestStorage_List ¶
func TestStorage_SetValue ¶
func TestStorage_Start ¶
Types ¶
type InstrumentedStorage ¶
type InstrumentedStorage interface { Storage prometheus.Collector }
InstrumentedStorage combines Storage and prometheus Collector interface.
type Storage ¶
type Storage interface { Setup() error TearDown() error Start(context.Context, string, string, string, string, map[string]string) (*mnemosynerpc.Session, error) Abandon(context.Context, string) (bool, error) Get(context.Context, string) (*mnemosynerpc.Session, error) List(context.Context, int64, int64, *time.Time, *time.Time) ([]*mnemosynerpc.Session, error) Exists(context.Context, string) (bool, error) Delete(context.Context, string, string, string, *time.Time, *time.Time) (int64, error) SetValue(context.Context, string, string, string) (map[string]string, error) }
Storage combines API that needs to be implemented by any storage to be replaceable.
Click to show internal directories.
Click to hide internal directories.