cfgroupcache

package module
v0.0.0-...-7c6677f Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: MIT Imports: 8 Imported by: 1

README

cf-groupcache

Implements a HTTP PeerPicker for GroupCache that is compatible with Cloud Foundry.

CF Groupcache enables a Cloud Foundry application to use groupcache. It marks each request with the according X-CF-APP-INSTANCE so the Gorouter can route each request correctly.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPPool

type HTTPPool struct {
	*groupcache.HTTPPool

	Transport func(groupcache.Context) http.RoundTripper
}

func NewHTTPPool

func NewHTTPPool(selfRoute, selfAppInstance string) *HTTPPool

func NewHTTPPoolOpts

func NewHTTPPoolOpts(selfRoute, selfAppInstance string, o *groupcache.HTTPPoolOptions) *HTTPPool

func (*HTTPPool) Set

func (p *HTTPPool) Set(route string, appInstances ...string)

type PeerManager

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

func NewPeerManager

func NewPeerManager(route, appGuid string, s PeerSetter, f StatsFetcher, log *log.Logger) *PeerManager

func (*PeerManager) Tick

func (m *PeerManager) Tick(ctx context.Context)

type PeerSetter

type PeerSetter interface {
	Set(route string, appInstances ...string)
}

type StatsFetcher

type StatsFetcher interface {
	ProcessStats(ctx context.Context, processGuid string) ([]capi.ProcessStats, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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