@@ -25,8 +25,6 @@ import (
2525 "github.com/golang/glog"
2626 "github.com/pkg/errors"
2727 "github.com/spf13/cobra"
28- "github.com/spf13/viper"
29- "google.golang.org/grpc"
3028 "google.golang.org/grpc/metadata"
3129
3230 "github.com/dgraph-io/badger/v4"
@@ -142,12 +140,7 @@ func init() {
142140 "Number of N-Quads to send as part of a mutation." )
143141 flag .StringP ("xidmap" , "x" , "" , "Directory to store xid to uid mapping" )
144142 flag .StringP ("auth_token" , "t" , "" ,
145- "The auth token passed to the server for Alter operation of the schema file. " +
146- "If used with --slash_grpc_endpoint, then this should be set to the API token issued" +
147- "by Slash GraphQL" )
148- flag .String ("slash_grpc_endpoint" , "" , "Path to Slash GraphQL GRPC endpoint. " +
149- "If --slash_grpc_endpoint is set, all other TLS options and connection options will be" +
150- "ignored" )
143+ "The auth token passed to the server for Alter operation of the schema file" )
151144 flag .BoolP ("use_compression" , "C" , false ,
152145 "Enable compression on connection to alpha server" )
153146 flag .Bool ("new_uids" , false ,
@@ -584,7 +577,7 @@ func (l *loader) processLoadFile(ctx context.Context, rd *bufio.Reader, ck chunk
584577 return <- errCh
585578}
586579
587- func setup (opts batchMutationOptions , dc * dgo.Dgraph , conf * viper. Viper ) * loader {
580+ func setup (opts batchMutationOptions , dc * dgo.Dgraph ) * loader {
588581 var db * badger.DB
589582 if len (opt .clientDir ) > 0 {
590583 x .Check (os .MkdirAll (opt .clientDir , 0700 ))
@@ -599,11 +592,6 @@ func setup(opts batchMutationOptions, dc *dgo.Dgraph, conf *viper.Viper) *loader
599592 x .Checkf (err , "Error while creating badger KV posting store" )
600593 }
601594
602- dialOpts := []grpc.DialOption {}
603- if conf .GetString ("slash_grpc_endpoint" ) != "" && conf .IsSet ("auth_token" ) {
604- dialOpts = append (dialOpts , x .WithAuthorizationCredentials (conf .GetString ("auth_token" )))
605- }
606-
607595 xopts := xidmap.XidMapOptions {DB : db , DgClient : dc }
608596 alloc := xidmap .New (xopts )
609597 l := & loader {
@@ -745,7 +733,7 @@ func run() error {
745733 dg , closeFunc := x .GetDgraphClient (Live .Conf , true )
746734 defer closeFunc ()
747735
748- l := setup (bmOpts , dg , Live . Conf )
736+ l := setup (bmOpts , dg )
749737 if err := l .populateNamespaces (ctx , dg , singleNsOp ); err != nil {
750738 fmt .Printf ("Error while populating namespaces %s\n " , err )
751739 return err
0 commit comments