pingstore

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package pingstore enables database health checks through the db PingContext method. The Pinger interface allows mocking the Ping when testing with no db connectivity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultPinger

type DefaultPinger struct {
	datastore.Datastorer
}

DefaultPinger is the default implementation for pinging the db

func NewDefaultPinger

func NewDefaultPinger(ds datastore.Datastorer) DefaultPinger

NewDefaultPinger is an initializer for DefaultPinger

func (DefaultPinger) PingDB

func (d DefaultPinger) PingDB(ctx context.Context) error

PingDB pings the DB

type Pinger

type Pinger interface {
	PingDB(context.Context) error
}

Pinger pings the database

Jump to

Keyboard shortcuts

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