cluster

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2017 License: MPL-2.0 Imports: 15 Imported by: 2

Documentation

Overview

cluster handles the multi-master clustering of portal.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Clusterer      core.Backender
	Clusterer      Clusterable
	NoServiceError = errors.New("No Service Found")
	NoServerError  = errors.New("No Server Found")
	BadJson        = errors.New("Bad JSON syntax received in body")
)

Functions

func DeleteCert

func DeleteCert(cert core.CertBundle) error

func DeleteRoute

func DeleteRoute(route core.Route) error

func DeleteServer

func DeleteServer(svcId, srvId string) error

func DeleteService

func DeleteService(id string) error

func DeleteVip

func DeleteVip(vip core.Vip) error

func GetCerts

func GetCerts() ([]core.CertBundle, error)

func GetRoutes

func GetRoutes() ([]core.Route, error)

func GetServer

func GetServer(svcId, srvId string) (*core.Server, error)

func GetService

func GetService(id string) (*core.Service, error)

func GetServices

func GetServices() ([]core.Service, error)

func GetVips

func GetVips() ([]core.Vip, error)

func Init

func Init() error

func SetCert

func SetCert(cert core.CertBundle) error

func SetCerts

func SetCerts(certs []core.CertBundle) error

func SetRoute

func SetRoute(route core.Route) error

func SetRoutes

func SetRoutes(routes []core.Route) error

func SetServer

func SetServer(svcId string, server *core.Server) error

func SetServers

func SetServers(svcId string, servers []core.Server) error

func SetService

func SetService(service *core.Service) error

func SetServices

func SetServices(services []core.Service) error

func SetVip

func SetVip(vip core.Vip) error

func SetVips

func SetVips(vips []core.Vip) error

Types

type Clusterable

type Clusterable interface {
	core.Backender
	core.Proxyable
	core.Vipable
}

type None

type None struct{}

func (None) DeleteCert

func (n None) DeleteCert(cert core.CertBundle) error

func (None) DeleteRoute

func (n None) DeleteRoute(route core.Route) error

func (None) DeleteServer

func (n None) DeleteServer(svcId, srvId string) error

func (None) DeleteService

func (n None) DeleteService(id string) error

func (None) DeleteVip

func (n None) DeleteVip(vip core.Vip) error

func (None) GetCerts

func (n None) GetCerts() ([]core.CertBundle, error)

func (None) GetRoutes

func (n None) GetRoutes() ([]core.Route, error)

func (None) GetServer

func (n None) GetServer(svcId, srvId string) (*core.Server, error)

func (None) GetService

func (n None) GetService(id string) (*core.Service, error)

func (None) GetServices

func (n None) GetServices() ([]core.Service, error)

func (None) GetVips

func (n None) GetVips() ([]core.Vip, error)

func (None) Init

func (n None) Init() error

func (None) SetCert

func (n None) SetCert(cert core.CertBundle) error

func (None) SetCerts

func (n None) SetCerts(certs []core.CertBundle) error

func (None) SetRoute

func (n None) SetRoute(route core.Route) error

func (None) SetRoutes

func (n None) SetRoutes(routes []core.Route) error

func (None) SetServer

func (n None) SetServer(svcId string, server *core.Server) error

func (None) SetServers

func (n None) SetServers(svcId string, servers []core.Server) error

func (None) SetService

func (n None) SetService(service *core.Service) error

func (None) SetServices

func (n None) SetServices(services []core.Service) error

func (None) SetVip

func (n None) SetVip(vip core.Vip) error

func (None) SetVips

func (n None) SetVips(vips []core.Vip) error

func (None) UnInit

func (n None) UnInit() error

type Redis

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

func (Redis) DeleteCert

func (r Redis) DeleteCert(cert core.CertBundle) error

DeleteCert tells all members to remove the cert from their database. rolls back on failure

func (Redis) DeleteRoute

func (r Redis) DeleteRoute(route core.Route) error

DeleteRoute tells all members to remove the route from their database. rolls back on failure

func (*Redis) DeleteServer

func (r *Redis) DeleteServer(svcId, srvId string) error

DeleteServer tells all members to remove the server from their database. rolls back on failure

func (*Redis) DeleteService

func (r *Redis) DeleteService(id string) error

DeleteService tells all members to remove the service from their database. rolls back on failure

func (Redis) DeleteVip

func (r Redis) DeleteVip(vip core.Vip) error

func (*Redis) GetCerts

func (r *Redis) GetCerts() ([]core.CertBundle, error)

GetCerts gets a list of certs from the database, or another cluster member.

func (*Redis) GetRoutes

func (r *Redis) GetRoutes() ([]core.Route, error)

GetRoutes gets a list of routes from the database, or another cluster member.

func (*Redis) GetServer

func (r *Redis) GetServer(svcId, srvId string) (*core.Server, error)

GetServer - likely will never be called

func (*Redis) GetService

func (r *Redis) GetService(id string) (*core.Service, error)

GetService - likely will never be called

func (*Redis) GetServices

func (r *Redis) GetServices() ([]core.Service, error)

GetServices gets a list of services from the database, or another cluster member.

func (Redis) GetVips

func (r Redis) GetVips() ([]core.Vip, error)

func (*Redis) Init

func (r *Redis) Init() error

func (Redis) SetCert

func (r Redis) SetCert(cert core.CertBundle) error

SetCert tells all members to add the cert to their database. rolls back on failure

func (Redis) SetCerts

func (r Redis) SetCerts(certs []core.CertBundle) error

SetCerts tells all members to replace the certs in their database with a new set. rolls back on failure

func (Redis) SetRoute

func (r Redis) SetRoute(route core.Route) error

SetRoute tells all members to add the route to their database. rolls back on failure

func (Redis) SetRoutes

func (r Redis) SetRoutes(routes []core.Route) error

SetRoutes tells all members to replace the routes in their database with a new set. rolls back on failure

func (*Redis) SetServer

func (r *Redis) SetServer(svcId string, server *core.Server) error

SetServer tells all members to add the server to their database. rolls back on failure

func (*Redis) SetServers

func (r *Redis) SetServers(svcId string, servers []core.Server) error

SetServers tells all members to replace a service's servers with a new set. rolls back on failure

func (*Redis) SetService

func (r *Redis) SetService(service *core.Service) error

SetService tells all members to add the service to their database. rolls back on failure

func (*Redis) SetServices

func (r *Redis) SetServices(services []core.Service) error

SetServices tells all members to replace the services in their database with a new set. rolls back on failure

func (Redis) SetVip

func (r Redis) SetVip(vip core.Vip) error

func (Redis) SetVips

func (r Redis) SetVips(vips []core.Vip) error

todo: clustered

Jump to

Keyboard shortcuts

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