coordinator

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2014 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REQUEST_RETRY_ATTEMPTS = 2
	MAX_RESPONSE_SIZE      = MAX_REQUEST_SIZE
	MAX_REQUEST_TIME       = time.Second * 1200
	RECONNECT_RETRY_WAIT   = time.Millisecond * 100
)
View Source
const (
	DEFAULT_ROOT_PWD        = "root"
	DEFAULT_ROOT_PWD_ENVKEY = "INFLUXDB_INIT_PWD"
	RAFT_NAME_SIZE          = 8
)
View Source
const KILOBYTE = 1024
View Source
const MAX_REQUEST_SIZE = MEGABYTE * 2
View Source
const (
	MAX_SIZE = 10 * MEGABYTE
)
View Source
const MEGABYTE = 1024 * KILOBYTE

Variables

This section is empty.

Functions

func SendCommandToServer

func SendCommandToServer(url string, command raft.Command) (interface{}, error)

Types

type ChangeDbUserPassword

type ChangeDbUserPassword struct {
	Database string
	Username string
	Hash     string
}

func NewChangeDbUserPasswordCommand

func NewChangeDbUserPasswordCommand(db, username, hash string) *ChangeDbUserPassword

func (*ChangeDbUserPassword) Apply

func (c *ChangeDbUserPassword) Apply(server raft.Server) (interface{}, error)

func (*ChangeDbUserPassword) CommandName

func (c *ChangeDbUserPassword) CommandName() string

type ChangeDbUserPermissions

type ChangeDbUserPermissions struct {
	Database         string
	Username         string
	ReadPermissions  string
	WritePermissions string
}

func NewChangeDbUserPermissionsCommand

func NewChangeDbUserPermissionsCommand(db, username, readPermissions, writePermissions string) *ChangeDbUserPermissions

func (*ChangeDbUserPermissions) Apply

func (c *ChangeDbUserPermissions) Apply(server raft.Server) (interface{}, error)

func (*ChangeDbUserPermissions) CommandName

func (c *ChangeDbUserPermissions) CommandName() string

type ContinuousQueryWriter

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

func NewContinuousQueryWriter

func NewContinuousQueryWriter(
	c *Coordinator,
	db, target string,
	query *parser.SelectQuery,
) *ContinuousQueryWriter

func (*ContinuousQueryWriter) Close

func (self *ContinuousQueryWriter) Close() error

func (*ContinuousQueryWriter) Name added in v0.8.8

func (self *ContinuousQueryWriter) Name() string

func (*ContinuousQueryWriter) Next added in v0.8.8

func (self *ContinuousQueryWriter) Next() engine.Processor

func (*ContinuousQueryWriter) Yield added in v0.8.8

func (self *ContinuousQueryWriter) Yield(series *protocol.Series) (bool, error)

type Coordinator

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

func NewCoordinator added in v0.8.8

func NewCoordinator(
	config *configuration.Configuration,
	raftServer *RaftServer,
	clusterConfiguration *cluster.ClusterConfiguration) *Coordinator

func (*Coordinator) AuthenticateClusterAdmin added in v0.8.8

func (self *Coordinator) AuthenticateClusterAdmin(username, password string) (common.User, error)

func (*Coordinator) AuthenticateDbUser added in v0.8.8

func (self *Coordinator) AuthenticateDbUser(db, username, password string) (common.User, error)

func (*Coordinator) ChangeClusterAdminPassword added in v0.8.8

func (self *Coordinator) ChangeClusterAdminPassword(requester common.User, username, password string) error

func (*Coordinator) ChangeDbUserPassword added in v0.8.8

func (self *Coordinator) ChangeDbUserPassword(requester common.User, db, username, password string) error

func (*Coordinator) ChangeDbUserPermissions added in v0.8.8

func (self *Coordinator) ChangeDbUserPermissions(requester common.User, db, username, readPermissions, writePermissions string) error

func (*Coordinator) CommitSeriesData added in v0.8.8

func (self *Coordinator) CommitSeriesData(db string, serieses []*protocol.Series, sync bool) error

func (*Coordinator) ConnectToProtobufServers added in v0.8.8

func (self *Coordinator) ConnectToProtobufServers(localRaftName string) error

func (*Coordinator) CreateClusterAdminUser added in v0.8.8

func (self *Coordinator) CreateClusterAdminUser(requester common.User, username, password string) error

func (*Coordinator) CreateDatabase

func (self *Coordinator) CreateDatabase(user common.User, db string) error

func (*Coordinator) CreateDbUser added in v0.8.8

func (self *Coordinator) CreateDbUser(requester common.User, db, username, password string, permissions ...string) error

func (*Coordinator) DeleteClusterAdminUser added in v0.8.8

func (self *Coordinator) DeleteClusterAdminUser(requester common.User, username string) error

func (*Coordinator) DeleteDbUser added in v0.8.8

func (self *Coordinator) DeleteDbUser(requester common.User, db, username string) error

func (*Coordinator) DropDatabase

func (self *Coordinator) DropDatabase(user common.User, db string) error

func (*Coordinator) ForceCompaction

func (self *Coordinator) ForceCompaction(user common.User) error

func (*Coordinator) GetDbUser added in v0.8.8

func (self *Coordinator) GetDbUser(requester common.User, db string, username string) (common.User, error)

func (*Coordinator) InterpolateValuesAndCommit added in v0.8.8

func (self *Coordinator) InterpolateValuesAndCommit(query string, db string, series *protocol.Series, targetName string, assignSequenceNumbers bool) error

func (*Coordinator) ListClusterAdmins added in v0.8.8

func (self *Coordinator) ListClusterAdmins(requester common.User) ([]string, error)

func (*Coordinator) ListContinuousQueries

func (self *Coordinator) ListContinuousQueries(user common.User, db string) ([]*protocol.Series, error)

func (*Coordinator) ListDatabases

func (self *Coordinator) ListDatabases(user common.User) ([]*cluster.Database, error)

func (*Coordinator) ListDbUsers added in v0.8.8

func (self *Coordinator) ListDbUsers(requester common.User, db string) ([]common.User, error)

func (*Coordinator) ProcessContinuousQueries added in v0.8.8

func (self *Coordinator) ProcessContinuousQueries(db string, series *protocol.Series)

func (*Coordinator) RunQuery

func (self *Coordinator) RunQuery(user common.User, database string, queryString string, p engine.Processor) (err error)

func (*Coordinator) SetDbAdmin added in v0.8.8

func (self *Coordinator) SetDbAdmin(requester common.User, db, username string, isAdmin bool) error

func (*Coordinator) WriteSeriesData

func (self *Coordinator) WriteSeriesData(user common.User, db string, series []*protocol.Series) error

type CreateContinuousQueryCommand

type CreateContinuousQueryCommand struct {
	Database string `json:"database"`
	Query    string `json:"query"`
}

func NewCreateContinuousQueryCommand

func NewCreateContinuousQueryCommand(database string, query string) *CreateContinuousQueryCommand

func (*CreateContinuousQueryCommand) Apply

func (c *CreateContinuousQueryCommand) Apply(server raft.Server) (interface{}, error)

func (*CreateContinuousQueryCommand) CommandName

func (c *CreateContinuousQueryCommand) CommandName() string

type CreateDatabaseCommand

type CreateDatabaseCommand struct {
	Name string `json:"name"`
}

func NewCreateDatabaseCommand

func NewCreateDatabaseCommand(name string) *CreateDatabaseCommand

func (*CreateDatabaseCommand) Apply

func (c *CreateDatabaseCommand) Apply(server raft.Server) (interface{}, error)

func (*CreateDatabaseCommand) CommandName

func (c *CreateDatabaseCommand) CommandName() string

type CreateSeriesFieldIdsCommand

type CreateSeriesFieldIdsCommand struct {
	Database string
	Series   []*protocol.Series
}

func NewCreateSeriesFieldIdsCommand

func NewCreateSeriesFieldIdsCommand(database string, series []*protocol.Series) *CreateSeriesFieldIdsCommand

func (*CreateSeriesFieldIdsCommand) Apply

func (c *CreateSeriesFieldIdsCommand) Apply(server raft.Server) (interface{}, error)

func (*CreateSeriesFieldIdsCommand) CommandName

func (c *CreateSeriesFieldIdsCommand) CommandName() string

func (*CreateSeriesFieldIdsCommand) Decode

func (*CreateSeriesFieldIdsCommand) Encode

type CreateShardSpaceCommand

type CreateShardSpaceCommand struct {
	ShardSpace *cluster.ShardSpace
}

func NewCreateShardSpaceCommand

func NewCreateShardSpaceCommand(space *cluster.ShardSpace) *CreateShardSpaceCommand

func (*CreateShardSpaceCommand) Apply

func (c *CreateShardSpaceCommand) Apply(server raft.Server) (interface{}, error)

func (*CreateShardSpaceCommand) CommandName

func (c *CreateShardSpaceCommand) CommandName() string

type CreateShardsCommand

type CreateShardsCommand struct {
	Shards    []*cluster.NewShardData
	SpaceName string
}

func NewCreateShardsCommand

func NewCreateShardsCommand(shards []*cluster.NewShardData) *CreateShardsCommand

func (*CreateShardsCommand) Apply

func (c *CreateShardsCommand) Apply(server raft.Server) (interface{}, error)

func (*CreateShardsCommand) CommandName

func (c *CreateShardsCommand) CommandName() string

func (*CreateShardsCommand) Decode

func (c *CreateShardsCommand) Decode(r io.Reader) error

func (*CreateShardsCommand) Encode

func (c *CreateShardsCommand) Encode(w io.Writer) error

type DeleteContinuousQueryCommand

type DeleteContinuousQueryCommand struct {
	Database string `json:"database"`
	Id       uint32 `json:"id"`
}

func NewDeleteContinuousQueryCommand

func NewDeleteContinuousQueryCommand(database string, id uint32) *DeleteContinuousQueryCommand

func (*DeleteContinuousQueryCommand) Apply

func (c *DeleteContinuousQueryCommand) Apply(server raft.Server) (interface{}, error)

func (*DeleteContinuousQueryCommand) CommandName

func (c *DeleteContinuousQueryCommand) CommandName() string

type DropDatabaseCommand

type DropDatabaseCommand struct {
	Name string `json:"name"`
}

func NewDropDatabaseCommand

func NewDropDatabaseCommand(name string) *DropDatabaseCommand

func (*DropDatabaseCommand) Apply

func (c *DropDatabaseCommand) Apply(server raft.Server) (interface{}, error)

func (*DropDatabaseCommand) CommandName

func (c *DropDatabaseCommand) CommandName() string

type DropSeriesCommand

type DropSeriesCommand struct {
	Database string
	Series   string
}

func NewDropSeriesCommand

func NewDropSeriesCommand(database, series string) *DropSeriesCommand

func (*DropSeriesCommand) Apply

func (c *DropSeriesCommand) Apply(server raft.Server) (interface{}, error)

func (*DropSeriesCommand) CommandName

func (c *DropSeriesCommand) CommandName() string

type DropShardCommand

type DropShardCommand struct {
	ShardId   uint32
	ServerIds []uint32
}

func NewDropShardCommand

func NewDropShardCommand(id uint32, serverIds []uint32) *DropShardCommand

func (*DropShardCommand) Apply

func (c *DropShardCommand) Apply(server raft.Server) (interface{}, error)

func (*DropShardCommand) CommandName

func (c *DropShardCommand) CommandName() string

type DropShardSpaceCommand

type DropShardSpaceCommand struct {
	Database string
	Name     string
}

func NewDropShardSpaceCommand

func NewDropShardSpaceCommand(database, name string) *DropShardSpaceCommand

func (*DropShardSpaceCommand) Apply

func (c *DropShardSpaceCommand) Apply(server raft.Server) (interface{}, error)

func (*DropShardSpaceCommand) CommandName

func (c *DropShardSpaceCommand) CommandName() string

type Handler added in v0.8.8

type Handler interface {
	HandleRequest(*protocol.Request, net.Conn) error
}

type InfluxChangeConnectionStringCommand

type InfluxChangeConnectionStringCommand struct {
	Name                     string `json:"name"`
	Force                    bool   `json:"force"`
	ConnectionString         string `json:"connectionString"`
	ProtobufConnectionString string `json:"protobufConnectionString"`
}

func (*InfluxChangeConnectionStringCommand) Apply

func (c *InfluxChangeConnectionStringCommand) Apply(server raft.Server) (interface{}, error)

func (*InfluxChangeConnectionStringCommand) CommandName

The name of the ChangeConnectionString command in the log

func (*InfluxChangeConnectionStringCommand) NodeName

type InfluxForceLeaveCommand

type InfluxForceLeaveCommand struct {
	Id uint32 `json:"id"`
}

func (*InfluxForceLeaveCommand) Apply

func (c *InfluxForceLeaveCommand) Apply(server raft.Server) (interface{}, error)

func (*InfluxForceLeaveCommand) CommandName

func (c *InfluxForceLeaveCommand) CommandName() string

The name of the ForceLeave command in the log

type InfluxJoinCommand

type InfluxJoinCommand struct {
	Name                     string `json:"name"`
	ConnectionString         string `json:"connectionString"`
	ProtobufConnectionString string `json:"protobufConnectionString"`
}

func (*InfluxJoinCommand) Apply

func (c *InfluxJoinCommand) Apply(server raft.Server) (interface{}, error)

func (*InfluxJoinCommand) CommandName

func (c *InfluxJoinCommand) CommandName() string

The name of the Join command in the log

func (*InfluxJoinCommand) NodeName

func (c *InfluxJoinCommand) NodeName() string

type MergeChannelProcessor added in v0.8.8

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

This struct is responsible for merging responses from multiple response channels and controlling the concurrency of querying by giving away `concurrency' channels at any given time. This is used in the coordinator to merge the responses received from different shards, which could be remote or local.

func NewMergeChannelProcessor added in v0.8.8

func NewMergeChannelProcessor(next engine.Processor, concurrency int) *MergeChannelProcessor

Return a new MergeChannelProcessor that will yield to `next'

func (*MergeChannelProcessor) Close added in v0.8.8

func (p *MergeChannelProcessor) Close() (err error)

Closes MergeChannelProcessor, this method has to make sure that all responses are received from the response channels. This is important since the protobuf client may block trying to insert a new response which will cause the entire node to stop receiving remote responses.

func (*MergeChannelProcessor) NextChannel added in v0.8.8

func (p *MergeChannelProcessor) NextChannel(bs int) (chan<- *protocol.Response, error)

Returns a new channel with buffer size `bs'. This method will block until there are channels available to return. Remember MergeChannelProcessor controls the concurrency of the query by guaranteeing no more than `concurrency' channels are given away at any given time.

func (*MergeChannelProcessor) ProcessChannels added in v0.8.8

func (p *MergeChannelProcessor) ProcessChannels()

Start processing the channels that are yielded by NextChannel() and yield the Series in the responses to the next Process.

func (*MergeChannelProcessor) String added in v0.8.8

func (p *MergeChannelProcessor) String() string

type Permissions

type Permissions struct{}

func (*Permissions) AuthorizeChangeClusterAdminPassword

func (self *Permissions) AuthorizeChangeClusterAdminPassword(user common.User) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeChangeDbUserPassword

func (self *Permissions) AuthorizeChangeDbUserPassword(user common.User, db string, targetUsername string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeChangeDbUserPermissions

func (self *Permissions) AuthorizeChangeDbUserPermissions(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeCreateClusterAdmin

func (self *Permissions) AuthorizeCreateClusterAdmin(user common.User) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeCreateContinuousQuery

func (self *Permissions) AuthorizeCreateContinuousQuery(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeCreateDatabase

func (self *Permissions) AuthorizeCreateDatabase(user common.User) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeCreateDbUser

func (self *Permissions) AuthorizeCreateDbUser(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeDeleteClusterAdmin

func (self *Permissions) AuthorizeDeleteClusterAdmin(user common.User) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeDeleteContinuousQuery

func (self *Permissions) AuthorizeDeleteContinuousQuery(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeDeleteDbUser

func (self *Permissions) AuthorizeDeleteDbUser(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeDeleteQuery

func (self *Permissions) AuthorizeDeleteQuery(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeDropDatabase

func (self *Permissions) AuthorizeDropDatabase(user common.User) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeDropSeries

func (self *Permissions) AuthorizeDropSeries(user common.User, db string, seriesName string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeGetDbUser

func (self *Permissions) AuthorizeGetDbUser(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeGrantDbUserAdmin

func (self *Permissions) AuthorizeGrantDbUserAdmin(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeListClusterAdmins

func (self *Permissions) AuthorizeListClusterAdmins(user common.User) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeListContinuousQueries

func (self *Permissions) AuthorizeListContinuousQueries(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeListDatabases

func (self *Permissions) AuthorizeListDatabases(user common.User) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeListDbUsers

func (self *Permissions) AuthorizeListDbUsers(user common.User, db string) (ok bool, err common.AuthorizationError)

func (*Permissions) AuthorizeSelectQuery added in v0.8.8

func (self *Permissions) AuthorizeSelectQuery(user common.User, db string, querySpec *parser.QuerySpec) (ok bool, err common.AuthorizationError)

func (*Permissions) CheckQueryPermissions added in v0.8.8

func (self *Permissions) CheckQueryPermissions(user common.User, db string, querySpec *parser.QuerySpec) (ok bool, err common.AuthorizationError)

type ProtobufClient

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

func NewProtobufClient

func NewProtobufClient(hostAndPort string, writeTimeout time.Duration) *ProtobufClient

func (*ProtobufClient) CancelRequest added in v0.8.8

func (self *ProtobufClient) CancelRequest(request *protocol.Request)

func (*ProtobufClient) ClearRequests

func (self *ProtobufClient) ClearRequests()

func (*ProtobufClient) Close

func (self *ProtobufClient) Close()

func (*ProtobufClient) Connect

func (self *ProtobufClient) Connect()

func (*ProtobufClient) MakeRequest

func (self *ProtobufClient) MakeRequest(request *protocol.Request, r cluster.ResponseChannel) error

Makes a request to the server. If the responseStream chan is not nil it will expect a response from the server with a matching request.Id. The REQUEST_RETRY_ATTEMPTS constant of 3 and the RECONNECT_RETRY_WAIT of 100ms means that an attempt to make a request to a downed server will take 300ms to time out.

type ProtobufRequestHandler

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

func NewProtobufRequestHandler

func NewProtobufRequestHandler(coordinator *Coordinator, clusterConfig *cluster.ClusterConfiguration) *ProtobufRequestHandler

func (*ProtobufRequestHandler) HandleRequest

func (self *ProtobufRequestHandler) HandleRequest(request *protocol.Request, conn net.Conn) error

func (*ProtobufRequestHandler) WriteResponse

func (self *ProtobufRequestHandler) WriteResponse(conn net.Conn, response *protocol.Response) error

type ProtobufServer

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

func NewProtobufServer

func NewProtobufServer(port string, requestHandler Handler) *ProtobufServer

func (*ProtobufServer) Close

func (self *ProtobufServer) Close()

func (*ProtobufServer) ListenAndServe

func (self *ProtobufServer) ListenAndServe()

type RaftServer

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

The raftd server is a combination of the Raft server and an HTTP server which acts as the transport.

func NewRaftServer

func NewRaftServer(config *configuration.Configuration, clusterConfig *cluster.ClusterConfiguration) *RaftServer

Creates a new server.

func (*RaftServer) AssignCoordinator

func (s *RaftServer) AssignCoordinator(coordinator *Coordinator) error

func (*RaftServer) ChangeConnectionString

func (s *RaftServer) ChangeConnectionString(raftName, protobufConnectionString, raftConnectionString string, forced bool) error

func (*RaftServer) ChangeDbUserPassword

func (s *RaftServer) ChangeDbUserPassword(db, username string, hash []byte) error

func (*RaftServer) ChangeDbUserPermissions

func (s *RaftServer) ChangeDbUserPermissions(db, username, readPermissions, writePermissions string) error

func (*RaftServer) Close

func (self *RaftServer) Close()

func (*RaftServer) CommittedAllChanges

func (s *RaftServer) CommittedAllChanges() bool

func (*RaftServer) CompactLog

func (s *RaftServer) CompactLog()

func (*RaftServer) CreateContinuousQuery

func (s *RaftServer) CreateContinuousQuery(db string, query string) error

func (*RaftServer) CreateDatabase

func (s *RaftServer) CreateDatabase(name string) error

func (*RaftServer) CreateRootUser

func (s *RaftServer) CreateRootUser() error

func (*RaftServer) CreateShardSpace

func (self *RaftServer) CreateShardSpace(shardSpace *cluster.ShardSpace) error

func (*RaftServer) CreateShards

func (self *RaftServer) CreateShards(shards []*cluster.NewShardData) ([]*cluster.ShardData, error)

func (*RaftServer) DeleteContinuousQuery

func (s *RaftServer) DeleteContinuousQuery(db string, id uint32) error

func (*RaftServer) DropDatabase

func (s *RaftServer) DropDatabase(name string) error

func (*RaftServer) DropSeries

func (self *RaftServer) DropSeries(database, series string) error

func (*RaftServer) DropShard

func (self *RaftServer) DropShard(id uint32, serverIds []uint32) error

func (*RaftServer) DropShardSpace

func (self *RaftServer) DropShardSpace(database, name string) error

func (*RaftServer) ForceLogCompaction

func (s *RaftServer) ForceLogCompaction() error

func (*RaftServer) GetLeaderRaftConnectString added in v0.8.1

func (s *RaftServer) GetLeaderRaftConnectString() (string, bool)

* * return a consistant leader raft connection string when called on all living nodes include leader.

func (*RaftServer) GetLeaderRaftName

func (s *RaftServer) GetLeaderRaftName() string

func (*RaftServer) GetOrSetFieldIdsForSeries

func (self *RaftServer) GetOrSetFieldIdsForSeries(database string, series []*protocol.Series) ([]*protocol.Series, error)

func (*RaftServer) GetRaftName

func (s *RaftServer) GetRaftName() string

func (*RaftServer) HandleFunc

func (s *RaftServer) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

This is a hack around Gorilla mux not providing the correct net/http HandleFunc() interface.

func (*RaftServer) IsLeaderByRaftName

func (s *RaftServer) IsLeaderByRaftName(name string) bool

func (*RaftServer) Join

func (s *RaftServer) Join(leader string) error

Joins to the leader of an existing cluster.

func (*RaftServer) ListenAndServe

func (s *RaftServer) ListenAndServe() error

func (*RaftServer) RemoveServer

func (s *RaftServer) RemoveServer(id uint32) error

Joins to the leader of an existing cluster.

func (*RaftServer) SaveClusterAdminUser

func (s *RaftServer) SaveClusterAdminUser(u *cluster.ClusterAdmin) error

func (*RaftServer) SaveDbUser

func (s *RaftServer) SaveDbUser(u *cluster.DbUser) error

func (*RaftServer) Serve

func (s *RaftServer) Serve(l net.Listener) error

func (*RaftServer) SetContinuousQueryTimestamp

func (s *RaftServer) SetContinuousQueryTimestamp(timestamp time.Time) error

func (*RaftServer) StartProcessingContinuousQueries

func (s *RaftServer) StartProcessingContinuousQueries()

func (*RaftServer) UpdateShardSpace added in v0.8.3

func (self *RaftServer) UpdateShardSpace(shardSpace *cluster.ShardSpace) error

type SaveClusterAdminCommand

type SaveClusterAdminCommand struct {
	User *cluster.ClusterAdmin `json:"user"`
}

func NewSaveClusterAdminCommand

func NewSaveClusterAdminCommand(u *cluster.ClusterAdmin) *SaveClusterAdminCommand

func (*SaveClusterAdminCommand) Apply

func (c *SaveClusterAdminCommand) Apply(server raft.Server) (interface{}, error)

func (*SaveClusterAdminCommand) CommandName

func (c *SaveClusterAdminCommand) CommandName() string

type SaveDbUserCommand

type SaveDbUserCommand struct {
	User *cluster.DbUser `json:"user"`
}

func NewSaveDbUserCommand

func NewSaveDbUserCommand(u *cluster.DbUser) *SaveDbUserCommand

func (*SaveDbUserCommand) Apply

func (c *SaveDbUserCommand) Apply(server raft.Server) (interface{}, error)

func (*SaveDbUserCommand) CommandName

func (c *SaveDbUserCommand) CommandName() string

type SetContinuousQueryTimestampCommand

type SetContinuousQueryTimestampCommand struct {
	Timestamp time.Time `json:"timestamp"`
}

func NewSetContinuousQueryTimestampCommand

func NewSetContinuousQueryTimestampCommand(timestamp time.Time) *SetContinuousQueryTimestampCommand

func (*SetContinuousQueryTimestampCommand) Apply

func (c *SetContinuousQueryTimestampCommand) Apply(server raft.Server) (interface{}, error)

func (*SetContinuousQueryTimestampCommand) CommandName

func (c *SetContinuousQueryTimestampCommand) CommandName() string

type ShardAwareObject

type ShardAwareObject interface {
	GetShards(querySpec *parser.QuerySpec) []cluster.Shard
	// returns true if results from shards can just be ordered. false if the results are raw points that
	// need to be sent through the query engine
	CanCollateShards(querySpec *parser.QuerySpec) bool
	GetShardById(id uint32) cluster.Shard
	GetShardToWriteToBySeriesAndTime(db, series string, microsecondsEpoch int64) (cluster.Shard, error)
}

These are things that the Coordinator need (defined in Coordinator, will have to import cluster package)

type UpdateShardSpaceCommand added in v0.8.3

type UpdateShardSpaceCommand struct {
	ShardSpace *cluster.ShardSpace
}

func NewUpdateShardSpaceCommand added in v0.8.3

func NewUpdateShardSpaceCommand(space *cluster.ShardSpace) *UpdateShardSpaceCommand

func (*UpdateShardSpaceCommand) Apply added in v0.8.3

func (c *UpdateShardSpaceCommand) Apply(server raft.Server) (interface{}, error)

func (*UpdateShardSpaceCommand) CommandName added in v0.8.3

func (c *UpdateShardSpaceCommand) CommandName() string

Jump to

Keyboard shortcuts

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