Skip to content

CuriosityChina/httpcluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpcluster

Make multiple http api endpoint work like a cluster

Build Status GoDoc

Usage

package main

import (
	"log"

	"github.com/lowstz/httpcluster"
)

func main() {
	var httpClusterUrl = "http://192.168.1.2:8000,192.168.1.3:8000,192.168.1.4:8000"
	cluster, err := httpcluster.NewHttpCluster(httpClusterUrl, "/ping")
	if err != nil {
		log.Fatalf("error: %s", err)
	}
	log.Printf("cluster size: %d", cluster.Size())
}

About

make multiple http api endpoint work like a cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages