Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Session storage service configuration options.
func ProvideConfig ¶
func ProvideConfig() Config
ProvideConfig is a wire provider for session storage configuration.
type Service ¶
type Service interface {
// GetSession retrieves stored session and returns it.
// Returned boolean flag is false is no session was found.
GetSession(visitorId string) (event.Session, bool)
// UpsertSession updates or insert a new session and return true if upsert
// wasn't ignored. Upsert are ignored if more recent session already exists.
// A session is considered more recent if stored session UUID differ and
// session.SessionTime() is more recent or if sessions shares same session
// UUIDs but session.Version() is greater than stored one.
UpsertSession(session event.Session) bool
}
Service define an in memory session storage.
func ProvideService ¶
func ProvideService( logger zerolog.Logger, cfg Config, promRegistry *prometheus.Registry, ) Service
ProvideService is a wire provider for in memory session storage.
Click to show internal directories.
Click to hide internal directories.