service

package
v0.0.0-...-25c693f Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Insert

func Insert(rm db.RowMutation)

Insert will apply this row mutation to all replicas. (TODO) It will take care of the possibility of a replica being down and hint the data across to some other replica.

Types

type ColumnOrSuperColumn

type ColumnOrSuperColumn struct {
	Column  *db.Column
	SColumn *db.SuperColumn
}

ColumnOrSuperColumn ...

func NewColumnOrSuperColumn

func NewColumnOrSuperColumn(column *db.Column, superColumn *db.SuperColumn) ColumnOrSuperColumn

NewColumnOrSuperColumn ...

type ColumnParent

type ColumnParent struct {
	ColumnFamily string
	SuperColumn  []byte
}

ColumnParent ...

func NewColumnParent

func NewColumnParent(columnFamily string, superColumn []byte) ColumnParent

NewColumnParent ...

type ColumnPath

type ColumnPath struct {
	ColumnFamily string
	SuperColumn  []byte
	Column       []byte
}

ColumnPath ...

func NewColumnPath

func NewColumnPath(cf string, sc, c []byte) ColumnPath

NewColumnPath ...

type GetArgs

type GetArgs struct {
	Keyspace         string
	Key              string
	ColumnPath       ColumnPath
	ConsistencyLevel int
}

GetArgs ...

type GetReply

type GetReply struct {
	Cosc ColumnOrSuperColumn
}

GetReply ...

type GetSliceArgs

type GetSliceArgs struct {
	Keyspace         string
	Key              string
	ColumnParent     ColumnParent
	Predicate        SlicePredicate
	ConsistencyLevel int
}

GetSliceArgs ...

type GetSliceReply

type GetSliceReply struct {
	Columns []ColumnOrSuperColumn
}

GetSliceReply ...

type InsertArgs

type InsertArgs struct {
	Table            string
	Key              string
	CPath            ColumnPath
	Value            []byte
	Timestamp        int64
	ConsistencyLevel int
}

InsertArgs ...

type InsertReply

type InsertReply struct {
	Result string
}

InsertReply ...

type Mongongo

type Mongongo struct {
	// Mongongo struct
	Hostname string
	Port     int
}

Mongongo expose the interface of operations

func (*Mongongo) Get

func (mg *Mongongo) Get(args *GetArgs, reply *GetReply) error

Get ...

func (*Mongongo) GetSlice

func (mg *Mongongo) GetSlice(args *GetSliceArgs, reply *GetSliceReply) error

GetSlice ...

func (*Mongongo) Insert

func (mg *Mongongo) Insert(args *InsertArgs, reply *InsertReply) error

Insert is an rpc

func (*Mongongo) Start

func (mg *Mongongo) Start()

Start setup other service such as storageService

type RowMutationArgs

type RowMutationArgs struct {
	RM db.RowMutation
}

RowMutationArgs for rm arguments

type RowMutationReply

type RowMutationReply struct {
	Result string
}

RowMutationReply for rm reply structure

type SlicePredicate

type SlicePredicate struct {
	ColumnNames [][]byte
	SRange      SliceRange
}

SlicePredicate ...

func NewSlicePredicate

func NewSlicePredicate(columnNames [][]byte, sRange SliceRange) SlicePredicate

NewSlicePredicate ...

type SliceRange

type SliceRange struct {
	Start    []byte
	Finish   []byte
	Reversed bool
	Count    int
}

SliceRange ...

func NewSliceRange

func NewSliceRange(start, finish []byte, reversed bool, count int) SliceRange

NewSliceRange ...

type StorageLoadBalancer

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

StorageLoadBalancer keeps load information across the system. It registers itself with the Gossiper for load information which is the number of requests processed w.r.t distinct keys at an endpoint. Monitor load information at the interval of 5 minutes then do load balancing operations if necessary.

func NewStorageLoadBalancer

func NewStorageLoadBalancer(ss *StorageService) *StorageLoadBalancer

NewStorageLoadBalancer initializes a storage load balancer.

type StorageService

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

StorageService apply functions to storage layer

func GetInstance

func GetInstance() *StorageService

GetInstance return storageServer instance

func (*StorageService) DoRowMutation

func (ss *StorageService) DoRowMutation(args *db.RowMutationArgs, reply *db.RowMutationReply) error

DoRowMutation is an rpc served by storage service

func (*StorageService) DoRowRead

func (ss *StorageService) DoRowRead(args *db.RowReadArgs, reply *db.RowReadReply) error

DoRowRead is an rpc served by storage service

func (*StorageService) OnChange

func (ss *StorageService) OnChange(endpoint network.EndPoint, epState *gms.EndPointState)

OnChange implements interface for endpoint state change subscriber

func (*StorageService) Start

func (ss *StorageService) Start()

Start will setup RPC server for storage service

Jump to

Keyboard shortcuts

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