ZeroClient / go client example

Any example on how to connect with the new prototype?

func NewDgraphClient(zero protos.ZeroClient, dc protos.DgraphClient) *Dgraph

This is giving me some headache as it is not clear how to connect/use this new format.

Thanks!

Alright, I found an example in the source code, nevertheless seems like a broken test.

This is the way it makes the connection:

conn, err := grpc.Dial("localhost:8888", grpc.WithInsecure())
	if err != nil {
		log.Fatal(err)
	}
	zero := protos.NewZeroClient(conn)

	conn, err = grpc.Dial("localhost:9080", grpc.WithInsecure())
	if err != nil {
		log.Fatal(err)
	}
	dc := protos.NewDgraphClient(conn)

	dg := client.NewDgraphClient(zero, dc)

Nevertheless is useless, it keeps throwing:

“2017/10/16 15:27:58 Error while retrieving timestamps: rpc error: code = Unimplemented desc = unknown method Timestamps. Will retry…”

The master branch is undergoing some rapid changes at the moment, and won’t be stable until the next release. Feel free to have a play around with it if you’d like a preview of how it is likely to change, but it’s not necessarily in a usable state right now. We’ll do a new release once we’re happy with the changes we’re making and are sure it’s stable.

1 Like

When will it be stable?

@felipellrocha, it will be stable quite soon (maybe within a week). We’re just finished off some testing and documentation changes in preparation for the v0.9.0 release. After that, we expect master to be stable at all times.

To add to @peter, v0.9 onwards, we expect to be stable and aim towards our 1.0 launch.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.