local

command module
v0.0.0-...-ab41af5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

README

Build local cluster using Ring

This examples uses loopback interface to build a ring of multiple processes locally.

Usage

  1. Build
go build local.go
  1. Start a peer
./local -bindaddr=127.0.0.1
  1. Start another peer in different terminal
./local -bindaddr=127.0.0.2 -join-member=127.0.0.1
  1. You can start as many peers as you want with different loopback bindaddr.

  2. Check the ring page

Go to ring page of one of the peers. Each peer's ring page should show all the peers in the ring. Should look something like below.

e.g: http://127.0.0.1:8100/ring

Ring Status Page

  1. Also check the memberlist status page.

e.g: https://127.0.0.1:8100/kv

Memberlist Status Page

  1. You can also get the ring information as a client.
./local -mode=client

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL