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/>.
Package worker contains code for intern.worker communication to perform queries and mutations.
Index ¶
- Constants
- func AssignUidsOverNetwork(ctx context.Context, num *intern.Num) (*api.AssignedIds, error)
- func BlockingStop()
- func CommitOverNetwork(ctx context.Context, tc *api.TxnContext) (uint64, error)
- func CouldApplyAggregatorOn(agrtr string, typ types.TypeID) bool
- func EvalCompare(cmp string, lv, rv int64) bool
- func ExportOverNetwork(ctx context.Context) error
- func GetSchemaOverNetwork(ctx context.Context, schema *intern.SchemaRequest) ([]*api.SchemaNode, error)
- func Init(ps *badger.ManagedDB)
- func MaxLeaseId() uint64
- func MutateOverNetwork(ctx context.Context, m *intern.Mutations) (*api.TxnContext, error)
- func ProcessTaskOverNetwork(ctx context.Context, q *intern.Query) (*intern.Result, error)
- func RunServer(bindall bool)
- func SortOverNetwork(ctx context.Context, q *intern.SortMessage) (*intern.SortResult, error)
- func StartRaftNodes(walStore *badger.ManagedDB, bindall bool)
- func StoreStats() string
- func Timestamps(ctx context.Context, num *intern.Num) (*api.AssignedIds, error)
- func UpdateMembershipState(ctx context.Context) error
- func ValidateAndConvert(edge *intern.DirectedEdge, schemaType types.TypeID) error
- type FuncType
- type KeyValueOrCleanProposal
- type Options
Constants ¶
const (
// MB represents a megabyte.
MB = 1 << 20
)
Variables ¶
This section is empty.
Functions ¶
func AssignUidsOverNetwork ¶ added in v0.7.0
func BlockingStop ¶ added in v0.7.3
func BlockingStop()
BlockingStop stops all the nodes, server between other workers and syncs all marks.
func CommitOverNetwork ¶ added in v0.9.0
CommitOverNetwork makes a proxy call to Zero to commit or abort a transaction.
func CouldApplyAggregatorOn ¶ added in v0.7.3
func EvalCompare ¶ added in v0.7.3
func ExportOverNetwork ¶ added in v0.8.2
func GetSchemaOverNetwork ¶ added in v0.8.2
func GetSchemaOverNetwork(ctx context.Context, schema *intern.SchemaRequest) ([]*api.SchemaNode, error)
GetSchemaOverNetwork checks which group should be serving the schema according to fingerprint of the predicate and sends it to that instance.
func MaxLeaseId ¶ added in v0.9.0
func MaxLeaseId() uint64
func MutateOverNetwork ¶
MutateOverNetwork checks which group should be running the mutations according to the group config and sends it to that instance.
func ProcessTaskOverNetwork ¶
ProcessTaskOverNetwork is used to process the query and get the result from the instance which stores posting list corresponding to the predicate in the query.
func RunServer ¶ added in v0.7.0
func RunServer(bindall bool)
RunServer initializes a tcp server on port which listens to requests from other workers for intern.communication.
func SortOverNetwork ¶ added in v0.7.0
func SortOverNetwork(ctx context.Context, q *intern.SortMessage) (*intern.SortResult, error)
SortOverNetwork sends sort query over the network.
func StartRaftNodes ¶ added in v0.7.0
StartRaftNodes will read the WAL dir, create the RAFT groups, and either start or restart RAFT nodes. This function triggers RAFT nodes to be created, and is the entrace to the RAFT world from main.go.
func Timestamps ¶ added in v0.9.0
func UpdateMembershipState ¶ added in v1.0.4
func ValidateAndConvert ¶ added in v0.8.2
func ValidateAndConvert(edge *intern.DirectedEdge, schemaType types.TypeID) error
If storage type is specified, then check compatibility or convert to schema type if no storage type is specified then convert to schema type.
Types ¶
type KeyValueOrCleanProposal ¶ added in v1.0.4
type KeyValueOrCleanProposal struct {
// contains filtered or unexported fields
}