gocassa

package
v0.0.0-...-cbea63e Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HealthCheckId  = "com.hailocab.service.cassandra-gocassa"
	MaxConnCheckId = "com.hailocab.service.cassandra-gocassa.maxconns"
)

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(keyspace gocassa.KeySpace, cfs ...string) healthcheck.Checker

HealthCheck verifies we can connect to the supplied C* keyspace, and verifies the passed column families exist

func KeySpace

func KeySpace() gocassa.KeySpace

Returns a configured keyspace for this service. The name is composed from the service name, but this is not relevant to the caller. If the name of the keyspace is important, use KeySpaceWithName.

func KeySpaceWithName

func KeySpaceWithName(ks string) gocassa.KeySpace

Do not use this unless you have already existing data in an already existing keyspace.

func MaxConnHealthCheck

func MaxConnHealthCheck(maxconns int) healthcheck.Checker

MaxConnHealthCheck asserts that the total number of established connections to all C* nodes falls below a given max threshold.

Types

type ConnectorFunc

type ConnectorFunc func(ks string) gocassa.Connection
var (
	DefaultConnector ConnectorFunc = gocqlConnector
	Connector        ConnectorFunc = DefaultConnector // Connector is the active ConnectorFunc

)

Jump to

Keyboard shortcuts

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