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 { // InsertSession inserts session in session storage and associate it to the // given deviceId. InsertSession(deviceId uint64, session event.Session) // IncSessionPageviewCount increments pageview and returns it. IncSessionPageviewCount(deviceId uint64) (event.Session, bool) // IdentifySession updates stored session visitor id. Updated session and // boolean found flag are returned. IdentifySession(deviceId uint64, visitorId string) (event.Session, bool) // WaitForSession retrieves stored session and returns it. If session is not // found, it waits until it is created or timeout. // Returned boolean flag is false if wait timed out and returned an empty // session. WaitSession(deviceId uint64, timeout time.Duration) (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.