Documentation ¶
Index ¶
- type Config
- type ConfigUpdate
- type CreateResponse
- type Keyspace
- func (kspace *Keyspace) Check(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (kspace *Keyspace) Create(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (kspace *Keyspace) GetAll(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (kspace *Keyspace) ListDC(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (kspace *Keyspace) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- type Response
Constants ¶
This section is empty.
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"` }
Config is the json format for the keyspace configuration
type ConfigUpdate ¶
type ConfigUpdate struct {
Contact string `json:"contact,omitempty"`
}
ConfigUpdate is the json format for a keyspace update request
func (*ConfigUpdate) Validate ¶
func (c *ConfigUpdate) Validate() gobol.Error
Validate checks if the update to the keyspace will be valid
type CreateResponse ¶
type CreateResponse struct {
Ksid string `json:"ksid,omitempty"`
}
CreateResponse is the json format for a keyspace creation endpoint response
type Keyspace ¶
type Keyspace struct { *persistence.Storage // contains filtered or unexported fields }
Keyspace is a structure that represents the functionality of this module
func New ¶
func New( sts *tsstats.StatsTS, storage *persistence.Storage, devMode bool, defaultTTL int, maxAllowedTTL int, ) *Keyspace
New creates a new keyspace manager
func (*Keyspace) Check ¶
func (kspace *Keyspace) Check( w http.ResponseWriter, r *http.Request, ps httprouter.Params, )
Check verifies if a keyspace exists
func (*Keyspace) Create ¶
func (kspace *Keyspace) Create( w http.ResponseWriter, r *http.Request, ps httprouter.Params, )
Create is a rest endpoint to create a keyspace
func (*Keyspace) GetAll ¶
func (kspace *Keyspace) GetAll( w http.ResponseWriter, r *http.Request, ps httprouter.Params, )
GetAll is a rest endpoint that returns all the datacenters
func (*Keyspace) ListDC ¶
func (kspace *Keyspace) ListDC( w http.ResponseWriter, r *http.Request, ps httprouter.Params, )
ListDC lists all the datacenters in the cassandra / scylladb cluster
func (*Keyspace) Update ¶
func (kspace *Keyspace) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Update is a rest endpoint that takes care of updating the keyspace metadata information