binding

package
v0.0.0-...-9b813e6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2016 License: MIT Imports: 23 Imported by: 2

Documentation

Index

Constants

View Source
const (
	BINDING_URL               = "bindings/%%2f/e/%s/%s/%s"
	DEL_BINDING_URL           = "bindings/%%2f/e/%s/%s/%s/%s"
	FED_UPSTREAM_URL          = "parameters/federation-upstream/%%2f/%s"
	POLICIES_URL              = "policies/%%2f/%s"
	EXCHANGE_URL              = "exchanges/%%2f/%s"
	BINDINGS_FOR_EXCHANGE_URL = "exchanges/%%2f/%s/bindings/source"
	EXCHANGES_URL             = "exchanges/%2f"
	QUEUE_URL                 = "queues/%%2f/%s"
)

rabbitmq urls

View Source
const (
	REBIND_INTERVAL = 3 * time.Minute
	REBIND_TIMEOUT  = 2 * time.Minute // after this time, we treat rebinding as failed, and bail out compeltely
	LOCK_STRING     = "%s%s"
)

Variables

View Source
var (
	LocalHost         = raven.HOSTNAME
	DefaultRabbitPort = strconv.Itoa(*raven.ADMINPORT)
)

Functions

func CreateBinding

func CreateBinding(httpClient *http.Client, hostport string, b *domain.BindingDef) (err error)

func CreateExchange

func CreateExchange(exchange *domain.RabbitExchange, httpClient *http.Client) (err error)

func CreateQueue

func CreateQueue(queue *domain.RabbitQueue, httpClient *http.Client) (err error)

func CreateRabbitPolicy

func CreateRabbitPolicy(pattern string, name string, httpClient *http.Client, hostname string, port int) (err error)

func CreateTopicBindingE2Q

func CreateTopicBindingE2Q(httpClient *http.Client, hostport string, from string, destQueue string, topic string) (err error)

func CreateUpstreams

func CreateUpstreams(hostnamesArr []string, httpClient *http.Client, hostname string, port int) (err error)

func DeleteBinding

func DeleteBinding(httpClient *http.Client, hostport string, b *domain.BindingDef) error

func DeleteLocalServiceBindings

func DeleteLocalServiceBindings(httpClient *http.Client, hostport string, instanceId string, thisAz string) error

Use to delete bindings on this broker which point from h2o to this service

func DeleteRemoteServiceBindings

func DeleteRemoteServiceBindings(httpClient *http.Client, hostport string, service string, thisAz string) error

Use to delete bindings on remote brokers which point to this service

func DeleteServiceBindings

func DeleteServiceBindings(httpClient *http.Client, hostport string, instanceId string) error

Use to delete h2o -> service binding

func GetAllBindings

func GetAllBindings(httpClient *http.Client, hostport string, fromExchange string, to string, toType domain.DestinationTypeS) ([]*domain.BindingDef, error)

func GetAllExchangeBindings

func GetAllExchangeBindings(httpClient *http.Client, hostport string, exchange string) ([]*domain.BindingDef, error)

func GetAllExchanges

func GetAllExchanges(httpClient *http.Client, hostport string) (*[]domain.ExchangeDef, error)

func GetAllQueueBindings

func GetAllQueueBindings(httpClient *http.Client, hostport string, queue string) ([]*domain.BindingDef, error)

func GetAllRemoteExchanges

func GetAllRemoteExchanges(httpClient *http.Client, hostport string) ([]string, error)

Get names of all remote exchanges (e.g. ones with AZ as name)

func GetBindingsForExchange

func GetBindingsForExchange(httpClient *http.Client, hostport string, exchange string) (*[]domain.BindingDef, error)

func Init

func Init()

func IsRabbitFailedOver

func IsRabbitFailedOver(httpClient *http.Client, thisAz string) bool

func PostConnectHandler

func PostConnectHandler()

func SetupService

func SetupService(s *domain.Service) errors.Error

func TeardownRemoteServiceBindings

func TeardownRemoteServiceBindings(httpClient *http.Client, service string, azName string) errors.Error

func TeardownService

func TeardownService(service string, queue string, azName string) errors.Error

Types

This section is empty.

Jump to

Keyboard shortcuts

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