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/>.
* 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 DisposeEmbeddedDgraph()
- func NewEmbeddedDgraphClient(config Options, opts client.BatchMutationOptions, clientDir string) *client.Dgraph
- func ParseQueryAndMutation(ctx context.Context, r gql.Request) (res gql.Result, err error)
- func SetConfiguration(newConfig Options)
- type Options
- type Server
- type ServerState
Constants ¶
const MinAllottedMemory = 1024.0
Variables ¶
var DefaultConfig = Options{ PostingDir: "p", PostingTables: "loadtoram", WALDir: "w", Nomutations: false, AllottedMemory: -1.0, CommitFraction: 0.10, BaseWorkerPort: 12345, ExportPath: "export", NumPendingProposals: 2000, Tracing: 0.0, GroupIds: "0,1", MyAddr: "", PeerAddr: "", RaftId: 1, MaxPendingCount: 1000, ExpandEdge: true, InMemoryComm: false, ConfigFile: "", DebugMode: false, }
Functions ¶
func DisposeEmbeddedDgraph ¶
func DisposeEmbeddedDgraph()
func NewEmbeddedDgraphClient ¶
func ParseQueryAndMutation ¶
parseQueryAndMutation handles the cases where the query parsing code can hang indefinitely. We allow 1 second for parsing the query; and then give up.
func SetConfiguration ¶
func SetConfiguration(newConfig Options)
Types ¶
type Options ¶
type Options struct { PostingDir string PostingTables string WALDir string Nomutations bool AllottedMemory float64 CommitFraction float64 BaseWorkerPort int ExportPath string NumPendingProposals int Tracing float64 GroupIds string MyAddr string PeerAddr string RaftId uint64 MaxPendingCount uint64 ExpandEdge bool InMemoryComm bool ConfigFile string DebugMode bool }
var Config Options
TODO(tzdybal) - remove global
func GetDefaultEmbeddedConfig ¶
func GetDefaultEmbeddedConfig() Options
type Server ¶
type Server struct{}
Server implements protos.DgraphServer
func (*Server) AssignUids ¶
func (*Server) CheckVersion ¶
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.KV WALstore *badger.KV }
var State ServerState
TODO(tzdybal) - remove global
func NewServerState ¶
func NewServerState() (state ServerState)
func (*ServerState) Dispose ¶
func (s *ServerState) Dispose() error