Sign inSign up

griddb/go-client

By griddb

•Updated about 4 years ago

Image
0

118

griddb/go-client repository overview

⁠Overview GridDB Go?

GridDB Go Client is developed using GridDB C Client and SWIG (Simplified Wrapper and Interface Generator).

⁠How to use this image

⁠Start a GridDB Go instance

Starting a GridDB Go instance is simple.

Run images GridDB Go default mode and default setting

$ docker run --network="host" griddb/go

All variable of docker GridDB go client

VariableValue defaultType of variable
GRIDDB_CLUSTER_NAMEdockerGridDBSTRING
GRIDDB_USERNAMEadminSTRING
GRIDDB_PASSWORDadminSTRING
NOTIFICATION_PORT31999NUMBER
NOTIFICATION_ADDRESS239.0.0.1STRING
IP_NOTIFICATION_MEMBERNULLSTRING

All method of docker GridDB go

MODESTATUS(default)
MULTICASTON
FIXED LISTOFF

⁠About run GridDB Go with connection method

⁠GridDB Go run sample with Multicast mode

Run images GridDB go simple with multicast mode

$ docker run --network="host" griddb/go

Run image GridDB go with environment config for multicast mode

docker run --name container_name \
    --network="host" \
    -e GRIDDB_CLUSTER_NAME=<clustername> \
    -e NOTIFICATION_PORT=<port> \
    -e NOTIFICATION_ADDRESS=<multicast_address> \
    -e GRIDDB_USERNAME=<user> \
    -e GRIDDB_PASSWORD=<passwd> \
    griddb/go
⁠GridDB Go run sample with fixed list mode

Run images GridDB go simple with fixed list mode

$ docker run --network="host" -e IP_NOTIFICATION_MEMBER="10.10.xx.xx" griddb/go

Run image GridDB go with environment config for fixed list mode

docker run --name container_name \
    --network="host" \
    -e GRIDDB_CLUSTER_NAME=<clustername> \
    -e GRIDDB_USERNAME=<user> \
    -e GRIDDB_PASSWORD=<passwd> \
    -e IP_NOTIFICATION_MEMBER=<ip_machine_member> \
    griddb/go

Note :

  • GridDB server version 4.5, 4.6 and 5.0 CE support 1 member for fixed list method.
  • GridDB use option --network="host" to forward ports.

⁠Execute a sample program

⁠Run sample go

⁠Multicast method
$ docker run -d --network="host" griddb/griddb
$ docker run --network="host" griddb/go

Output :

--> [ 'name01', false, 1, <Buffer 41 42 43 44 45 46 47 48 49 4a> ]
⁠Fixed list method
$ docker run -d --network="host" -e NOTIFICATION_MEMBER=1 griddb/griddb
$ docker run --network="host" -e IP_NOTIFICATION_MEMBER="10.10.xx.xx" griddb/go

Output :

--> [ 'name01', false, 1, <Buffer 41 42 43 44 45 46 47 48 49 4a> ]

The more information about go client. Could please refer to here⁠

⁠Container shell access

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your GridDB go container:

$ docker exec -it container-name bash

About use docker exec for excute container go:

Step 1: Start GridDB server⁠

Step 2: Run image GridDB Go

$ docker run -d --network="host" -v `pwd`:/root/. --name griddb_go griddb/go tail -f /dev/null

Note: After finshed to run step 2. Image GridDB Go has:

  1. Name container is griddb_go
  2. Mount current folder into docker container.
  3. Process docker image GridDB go will run hidden. Run command $ docker ps about show it.
  4. In command: The pwd is current path when run image. The "/root/." is path into docker container. This 2 value can change with user purpose
  5. With command step 2. GridDB go can docker execute for 2 method(multicast method and fixed list method)

Step 3: Sample execute

$ docker execute -it griddb_go /bin/bash -xec "Your command"

Example:

$ docker execute -it griddb_go /bin/bash -xec "go sample1.js 239.0.0.1 31999 dockerGridDB admin admin"

⁠Stop a GridDB Go

If run sample GridDB go.

$ docker run --network="host" griddb/go

After finshed run sample image auto finish process.

If run execute GridDB go image

$ docker run -d --network="host" -v `pwd`:/root/. --name griddb_go griddb/go tail -f /dev/null

GridDB go will stop with command:

$ docker container stop griddb_go
or
$ docker kill griddb_go

⁠Image Variants

The griddb go images come in many flavors, each designed for a specific use case.

⁠griddb/go

  • This is default image of GridDB Go Client.

⁠griddb/go:<version>-focal

  • This is image of GridDB Go Client on Ubuntu. This image dedicated of GridDB go on Ubuntu 20.04.

⁠griddb/go:<version>-centos7

  • This is image of GridDB Go Client on CentOS. This image dedicated of GridDB go on CentOS 7.

⁠griddb/go:<version>-bionic

  • This is image of GridDB Go Client on Ubuntu. This image dedicated of GridDB go on Ubuntu 18.04.

⁠License

View license information⁠ for the software contained in this image.

Tag summary

Content type

Image

Digest

sha256:a36bdb01c…

Size

306 MB

Last updated

about 4 years ago

docker pull griddb/go-client:0.8.4-centos7