Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v0.12.19 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	log.CommonBackend
	// contains filtered or unexported fields
}

Backend writes entries to PostgreSQL.

func New

func New(connString string) (*Backend, error)

New constructs a Backend from the provided connection string.

func (*Backend) NotifyAboutSender

func (b *Backend) NotifyAboutSender(sender string)

NotifyAboutSender implements log.Backend but Postgres does not require pre-notification.

func (*Backend) NotifyAboutSeverity

func (b *Backend) NotifyAboutSeverity(severity *log.Severity)

NotifyAboutSeverity implements log.Backend but Postgres does not require pre-notification.

func (*Backend) Shutdown

func (b *Backend) Shutdown()

Shutdown closes the database connection.

func (*Backend) Write

func (b *Backend) Write(entry log.Entry) error

Write stores the entry in PostgreSQL.

Source Files

  • Backend.go

Jump to

Keyboard shortcuts

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