Documentation ¶
Overview ¶
* Copyright (C) 2017 Dgraph Labs, Inc. and Contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Copyright (C) 2017 Dgraph Labs, Inc. and Contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- Variables
- func InitServerState()
- func SetConfiguration(newConfig Options)
- type Options
- type Server
- func (s *Server) Alter(ctx context.Context, op *api.Operation) (*api.Payload, error)
- func (s *Server) CheckVersion(ctx context.Context, c *api.Check) (v *api.Version, err error)
- func (s *Server) CommitOrAbort(ctx context.Context, tc *api.TxnContext) (*api.TxnContext, error)
- func (s *Server) Mutate(ctx context.Context, mu *api.Mutation) (resp *api.Assigned, err error)
- func (s *Server) Query(ctx context.Context, req *api.Request) (resp *api.Response, err error)
- type ServerState
Constants ¶
const MinAllottedMemory = 1024.0
Variables ¶
var DefaultConfig = Options{ PostingDir: "p", PostingTables: "loadtoram", WALDir: "w", Nomutations: false, AllottedMemory: -1.0, ExportPath: "export", NumPendingProposals: 2000, Tracing: 0.0, MyAddr: "", ZeroAddr: "localhost:7080", MaxPendingCount: 1000, ExpandEdge: true, DebugMode: false, }
Functions ¶
func InitServerState ¶ added in v0.9.3
func InitServerState()
func SetConfiguration ¶
func SetConfiguration(newConfig Options)
Types ¶
type Options ¶
type Options struct { PostingDir string PostingTables string WALDir string Nomutations bool AllottedMemory float64 ExportPath string NumPendingProposals int Tracing float64 MyAddr string ZeroAddr string RaftId uint64 MaxPendingCount uint64 ExpandEdge bool DebugMode bool }
var Config Options
TODO(tzdybal) - remove global
type Server ¶
type Server struct{}
Server implements protos.DgraphServer
func (*Server) CheckVersion ¶
func (*Server) CommitOrAbort ¶
func (s *Server) CommitOrAbort(ctx context.Context, tc *api.TxnContext) (*api.TxnContext, error)
type ServerState ¶
type ServerState struct { FinishCh chan struct{} // channel to wait for all pending reqs to finish. ShutdownCh chan struct{} // channel to signal shutdown. Pstore *badger.ManagedDB WALstore *badger.ManagedDB // contains filtered or unexported fields }
var State ServerState
TODO(tzdybal) - remove global
func (*ServerState) Dispose ¶
func (s *ServerState) Dispose() error