cassandra

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CassandraPropertiesPrefix = "data.cassandra"
)

Variables

View Source
var Module = &bootstrap.Module{
	Name:       "cassandra",
	Precedence: bootstrap.DatabasePrecedence,
	Options: []fx.Option{
		fx.Provide(BindCassandraProperties, NewSession),
	},
}

Functions

func NewSession

func NewSession(p CassandraProperties) *gocql.Session

func Use

func Use()

Types

type CassandraProperties

type CassandraProperties struct {
	ContactPoints string         `json:"contact-points"` // comma separated
	Port          int            `json:"port"`
	KeySpaceName  string         `json:"keyspace-name"`
	Username      string         `json:"username"`
	Password      string         `json:"password"`
	Timeout       utils.Duration `json:"timeout"`
	Consistency   string         `json:"consistency"`
}

func NewCassandraProperties

func NewCassandraProperties() *CassandraProperties

func (CassandraProperties) Hosts

func (p CassandraProperties) Hosts() []string

Jump to

Keyboard shortcuts

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