MCPcopy
hub / github.com/dgraph-io/dgraph / Schema

Method Schema

worker/schema.go:226–235  ·  view source on GitHub ↗

Schema is used to get schema information over the network on other instances.

(ctx context.Context, s *pb.SchemaRequest)

Source from the content-addressed store, hash-verified

224
225// Schema is used to get schema information over the network on other instances.
226func (w *grpcWorker) Schema(ctx context.Context, s *pb.SchemaRequest) (*pb.SchemaResult, error) {
227 if ctx.Err() != nil {
228 return &emptySchemaResult, ctx.Err()
229 }
230
231 if !groups().ServesGroup(s.GroupId) {
232 return &emptySchemaResult, errors.Errorf("This server doesn't serve group id: %v", s.GroupId)
233 }
234 return getSchema(ctx, s)
235}
236
237// GetTypes processes the type requests and retrieves the desired types.
238func GetTypes(ctx context.Context, req *pb.SchemaRequest) ([]*pb.TypeUpdate, error) {

Callers

nothing calls this directly

Calls 4

groupsFunction · 0.85
ServesGroupMethod · 0.80
getSchemaFunction · 0.70
ErrorfMethod · 0.45

Tested by

no test coverage detected