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
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 BindCassandraProperties ¶
func BindCassandraProperties(ctx *bootstrap.ApplicationContext) CassandraProperties
func NewCassandraProperties ¶
func NewCassandraProperties() *CassandraProperties
func (CassandraProperties) Hosts ¶
func (p CassandraProperties) Hosts() []string
Click to show internal directories.
Click to hide internal directories.