remote

package
v0.0.0-...-ae13d62 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCache

func CreateCache(w http.ResponseWriter, params []string)

Create a new cache group and set cacheName, capacity, selfAddr, and clusterAddr If cacheName already exists, changing only the capacity, selfAddr and clusterAddr parameters will not work

Types

type HttpPool

type HttpPool struct {
	// contains filtered or unexported fields
}

func NewDefaultHttpPool

func NewDefaultHttpPool() *HttpPool

func NewHttpPool

func NewHttpPool(selfAddr string) *HttpPool

func (*HttpPool) PickNode

func (p *HttpPool) PickNode(key string) (peer node.NodeGetter, ok bool)

The key is passed through the hash ring to find the real host

func (*HttpPool) ServeHTTP

func (p *HttpPool) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*HttpPool) SetClusterAddr

func (p *HttpPool) SetClusterAddr(addrs ...string)

Register the cluster in the hash ring

Jump to

Keyboard shortcuts

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