keyspace

package
v0.0.0-...-1b5f0b1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCompaction = "org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy"

DefaultCompaction defines the default compaction strategy that cassandra will use for timeseries data

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Key               string `json:"key"`
	Name              string `json:"name"`
	Datacenter        string `json:"datacenter"`
	ReplicationFactor int    `json:"replicationFactor"`
	Contact           string `json:"contact"`
	TTL               int    `json:"ttl"`
	TUUID             bool   `json:"tuuid"`
}

func (*Config) Validate

func (c *Config) Validate() gobol.Error

type ConfigUpdate

type ConfigUpdate struct {
	Name    string `json:"name"`
	Contact string `json:"contact"`
}

func (*ConfigUpdate) Validate

func (c *ConfigUpdate) Validate() gobol.Error

type CreateResponse

type CreateResponse struct {
	Ksid string `json:"ksid,omitempty"`
}

type Keyspace

type Keyspace struct {
	// contains filtered or unexported fields
}

func New

func New(
	sts *tsstats.StatsTS,
	cass *gocql.Session,
	es *rubber.Elastic,
	usernameGrant,
	keyspaceMain string,
	compaction string,
	mTTL int,
) *Keyspace

func (*Keyspace) Check

func (kspace *Keyspace) Check(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Keyspace) Create

func (kspace *Keyspace) Create(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Keyspace) GetAll

func (kspace *Keyspace) GetAll(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (Keyspace) GetKeyspace

func (keyspace Keyspace) GetKeyspace(key string) (Config, bool, gobol.Error)

func (*Keyspace) ListDC

func (kspace *Keyspace) ListDC(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Keyspace) Update

func (kspace *Keyspace) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

type Response

type Response struct {
	TotalRecords int         `json:"totalRecords,omitempty"`
	Payload      interface{} `json:"payload,omitempty"`
	Message      interface{} `json:"message,omitempty"`
}

Jump to

Keyboard shortcuts

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