manager

package
v0.82.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StoreEngineEnv selects the access log store engine. Unset follows the main store engine.
	StoreEngineEnv = "NB_ACCESS_LOG_STORE_ENGINE"
	// PostgresDSNEnv is the access log Postgres DSN. Unset reuses the main store DSN.
	PostgresDSNEnv = "NB_ACCESS_LOG_POSTGRES_DSN"
	// SqliteFileEnv is the access log SQLite file, resolved against the data directory when relative.
	SqliteFileEnv = "NB_ACCESS_LOG_SQLITE_FILE"
	// MaxOpenConnsEnv sizes the access log connection pool. Unset applies NB_SQL_MAX_OPEN_CONNS.
	MaxOpenConnsEnv = "NB_ACCESS_LOG_SQL_MAX_OPEN_CONNS"
)

Variables

This section is empty.

Functions

func NewManager

func NewManager(repo accesslogs.Repository, store store.Store, permissionsManager permissions.Manager, geo geolocation.Geolocation) accesslogs.Manager

func NewRepository added in v0.81.0

func NewRepository(conn *db.Conn) accesslogs.Repository

NewRepository returns the access log repository backed by conn.

func OpenConn added in v0.82.0

func OpenConn(ctx context.Context, dataDir string, mainEngine db.Engine) (*db.Conn, error)

OpenConn opens and migrates the access log database. Unless configured otherwise, it follows mainEngine: SQLite uses its own file in dataDir and Postgres reuses the main DSN.

func RegisterEndpoints

func RegisterEndpoints(router *mux.Router, manager accesslogs.Manager)

Types

This section is empty.

Jump to

Keyboard shortcuts

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