edgraph

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: AGPL-3.0, Apache-2.0 Imports: 33 Imported by: 0

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

View Source
const MinAllottedMemory = 1024.0

Variables

View Source
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) Alter

func (s *Server) Alter(ctx context.Context, op *api.Operation) (*api.Payload, error)

func (*Server) CheckVersion

func (s *Server) CheckVersion(ctx context.Context, c *api.Check) (v *api.Version, err error)

func (*Server) CommitOrAbort

func (s *Server) CommitOrAbort(ctx context.Context, tc *api.TxnContext) (*api.TxnContext,
	error)

func (*Server) Mutate

func (s *Server) Mutate(ctx context.Context, mu *api.Mutation) (resp *api.Assigned, err error)

func (*Server) Query

func (s *Server) Query(ctx context.Context, req *api.Request) (resp *api.Response, err error)

This method is used to execute the query and return the response to the client as a protocol buffer message.

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

Jump to

Keyboard shortcuts

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