Documentation ¶
Index ¶
- Variables
- func APIAlivenessTest(api, user, passwd, vhost string) (map[string]interface{}, error)
- func APIChangeDefinitions(api, user, passwd string, config map[string]interface{}) error
- func APIChangeVhostDefinitions(api, user, passwd, vhost string, config map[string]interface{}) error
- func APIChannel(api, user, passwd, name string) (map[string]interface{}, error)
- func APIChnageClusterName(api, user, passwd string, params map[string]interface{}) error
- func APIClusterName(api, user, passwd string) (map[string]interface{}, error)
- func APIConnection(api, user, passwd, name string) (map[string]interface{}, error)
- func APICreateExchange(api, user, passwd, vhost, name string, params map[string]interface{}) error
- func APICreateGlobalParameter(api, user, passwd, name string, data map[string]interface{}) error
- func APICreateParameter(api, user, passwd, component, vhost, pname string, data map[string]interface{}) error
- func APICreatePermission(api, user, passwd, vhost, username string, data map[string]interface{}) error
- func APICreatePolicy(api, user, passwd, vhost, name string, data map[string]interface{}) error
- func APICreateQueue(api, user, passwd, vhost, name string, params map[string]interface{}) error
- func APICreateUser(api, user, passwd, name string, data map[string]interface{}) error
- func APICreateVhost(api, user, passwd, name string, tracing bool) error
- func APIDefinitions(api, user, passwd string) (map[string]interface{}, error)
- func APIDeleteExchange(api, user, passwd, vhost, name string) error
- func APIDeleteGlobalParameter(api, user, passwd, name string) error
- func APIDeleteParameter(api, user, passwd, component, vhost, name string) error
- func APIDeletePermission(api, user, passwd, vhost, username string) error
- func APIDeletePolicy(api, user, passwd, vhost, name string) error
- func APIDeleteQueue(api, user, passwd, vhost, name string) error
- func APIDeleteUser(api, user, passwd, name string) error
- func APIDeleteVhost(api, user, passwd, name string) error
- func APIExchange(api, user, passwd, vhost, name string) (map[string]interface{}, error)
- func APIExchangeBinding(api, user, passwd, vhost, source, destination, props string) (map[string]interface{}, error)
- func APIExchangeBindings(api, user, passwd, vhost, source, destination string) ([]map[string]interface{}, error)
- func APIExchangeCreateBinding(api, user, passwd, vhost, source, destination, key string, ...) (string, error)
- func APIExchangeDeleteBinding(api, user, passwd, vhost, source, destination, props string) error
- func APIExchangePublish(api, user, passwd, vhost, name string, params map[string]interface{}) (map[string]interface{}, error)
- func APIForceDeleteConnection(api, user, passwd, name, reason string) error
- func APIForceDeleteExchange(api, user, passwd, vhost, name string) error
- func APIForceDeleteQueue(api, user, passwd, vhost, name string) error
- func APIGlobalParameter(api, user, passwd, name string) (map[string]interface{}, error)
- func APIHealthCheck(api, user, passwd string) error
- func APIListChannels(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListConnectionChannels(api, user, passwd, name string) ([]map[string]interface{}, error)
- func APIListConnections(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListConsumers(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListExchangeDestinationBindings(api, user, passwd, vhost, name string) ([]map[string]interface{}, error)
- func APIListExchangeSourceBindings(api, user, passwd, vhost, name string) ([]map[string]interface{}, error)
- func APIListExchanges(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListExtensions(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListGlobalParameters(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListNodes(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListParameters(api, user, passwd, component, vhost string) ([]map[string]interface{}, error)
- func APIListPermissions(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListPolicies(api, user, passwd, vhost string) ([]map[string]interface{}, error)
- func APIListQueues(api, user, passwd, vhost string) ([]map[string]interface{}, error)
- func APIListUsers(api, user, passwd string) ([]map[string]interface{}, error)
- func APIListVhostChannels(api, user, passwd, name string) ([]map[string]interface{}, error)
- func APIListVhostConnections(api, user, passwd, vhost string) ([]map[string]interface{}, error)
- func APIListVhostConsumers(api, user, passwd, name string) ([]map[string]interface{}, error)
- func APIListVhostExchanges(api, user, passwd, name string) ([]map[string]interface{}, error)
- func APIListVhosts(api, user, passwd string) ([]map[string]interface{}, error)
- func APINode(api, user, passwd, name string, params map[string]string) (map[string]interface{}, error)
- func APINodeHealthCheck(api, user, passwd, node string) error
- func APIOverview(api, user, passwd string) (map[string]interface{}, error)
- func APIParameter(api, user, passwd, component, vhost, pname string) (map[string]interface{}, error)
- func APIPermission(api, user, passwd, vhost, username string) (map[string]interface{}, error)
- func APIPolicy(api, user, passwd, vhost, name string) (map[string]interface{}, error)
- func APIPurgeQueue(api, user, passwd, vhost, name string) error
- func APIQueue(api, user, passwd, vhost, name string) (map[string]interface{}, error)
- func APIQueueBindings(api, user, passwd, vhost, name string) ([]map[string]interface{}, error)
- func APIQueueCreateExchangeBinding(api, user, passwd, vhost, exchange, name, key string, ...) (string, error)
- func APIQueueDeleteExchangeBinding(api, user, passwd, vhost, exchange, name, props string) error
- func APIQueueExchangeBinding(api, user, passwd, vhost, exchange, name, props string) (map[string]interface{}, error)
- func APIQueueExchangeBindings(api, user, passwd, vhost, exchange, name string) ([]map[string]interface{}, error)
- func APIQueueMessages(api, user, passwd, vhost, name string, params map[string]interface{}) ([]map[string]interface{}, error)
- func APIQuickRegisterQueue(api, user, passwd, vhost, name string, bindings map[string][]string) error
- func APIUser(api, user, passwd, name string) (map[string]interface{}, error)
- func APIUserPermissions(api, user, passwd, name string) ([]map[string]interface{}, error)
- func APIVhost(api, user, passwd, name string) (map[string]interface{}, error)
- func APIVhostDefinitions(api, user, passwd, vhost string) (map[string]interface{}, error)
- func APIVhostPermissions(api, user, passwd, name string) ([]map[string]interface{}, error)
- func APIWhoAmI(api, user, passwd string) (map[string]interface{}, error)
- func GenerateConsumerName(name string) string
- type APIClient
- func (c *APIClient) APIBindings(api, user, passwd, vhost string) ([]map[string]interface{}, error)
- func (c *APIClient) AlivenessTest(vhost string) (map[string]interface{}, error)
- func (c *APIClient) Bindings(vhost string) ([]map[string]interface{}, error)
- func (c *APIClient) ChangeClusterName(params map[string]interface{}) error
- func (c *APIClient) ChangeDefinitions(config map[string]interface{}) error
- func (c *APIClient) ChangeVhostDefinitions(vhost string, config map[string]interface{}) error
- func (c *APIClient) Channel(name string) (map[string]interface{}, error)
- func (c *APIClient) Check() error
- func (c *APIClient) CheckUserPasswordHash(passwd, hash string) bool
- func (c *APIClient) ClusterName() (map[string]interface{}, error)
- func (c *APIClient) Connection(name string) (map[string]interface{}, error)
- func (c *APIClient) CreateExchange(vhost, name string, params map[string]interface{}) error
- func (c *APIClient) CreateGlobalParameter(name string, data map[string]interface{}) error
- func (c *APIClient) CreateParameter(component, vhost, name string, data map[string]interface{}) error
- func (c *APIClient) CreatePermission(vhost, user string, data map[string]interface{}) error
- func (c *APIClient) CreatePolicy(vhost, name string, data map[string]interface{}) error
- func (c *APIClient) CreateQueue(vhost, name string, params map[string]interface{}) error
- func (c *APIClient) CreateUser(name string, data map[string]interface{}) error
- func (c *APIClient) CreateVhost(name string, tracing bool) error
- func (c *APIClient) DELETE(paths interface{}) (*http.Response, error)
- func (c *APIClient) Definitions() (map[string]interface{}, error)
- func (c *APIClient) DeleteExchange(vhost, name string) error
- func (c *APIClient) DeleteGlobalParameter(name string) error
- func (c *APIClient) DeleteParameter(component, vhost, name string) error
- func (c *APIClient) DeletePermission(vhost, user string) error
- func (c *APIClient) DeletePolicy(vhost, name string) error
- func (c *APIClient) DeleteQueue(vhost, name string) error
- func (c *APIClient) DeleteUser(name string) error
- func (c *APIClient) DeleteVhost(name string) error
- func (c *APIClient) Do(req *http.Request) (*http.Response, error)
- func (c *APIClient) Exchange(vhost, name string) (map[string]interface{}, error)
- func (c *APIClient) ExchangeBinding(vhost, source, destination, props string) (map[string]interface{}, error)
- func (c *APIClient) ExchangeBindings(vhost, source, destination string) ([]map[string]interface{}, error)
- func (c *APIClient) ExchangeCreateBinding(vhost, source, destination, key string, args map[string]interface{}) (string, error)
- func (c *APIClient) ExchangeDeleteBinding(vhost, source, destination, props string) error
- func (c *APIClient) ExchangePublish(vhost, name string, params map[string]interface{}) (map[string]interface{}, error)
- func (c *APIClient) ForceDeleteConnection(name, reason string) error
- func (c *APIClient) ForceDeleteExchange(vhost, name string) error
- func (c *APIClient) ForceDeleteQueue(vhost, name string) error
- func (c *APIClient) GET(paths interface{}) (*http.Response, error)
- func (c *APIClient) GenerateUserPasswordHash(passwd string) string
- func (c *APIClient) GlobalParameter(name string) (map[string]interface{}, error)
- func (c *APIClient) HealthCheck() error
- func (c *APIClient) ListChannels() ([]map[string]interface{}, error)
- func (c *APIClient) ListConnectionChannels(name string) ([]map[string]interface{}, error)
- func (c *APIClient) ListConnections() ([]map[string]interface{}, error)
- func (c *APIClient) ListConsumers() ([]map[string]interface{}, error)
- func (c *APIClient) ListExchangeDestinationBindings(vhost, name string) ([]map[string]interface{}, error)
- func (c *APIClient) ListExchangeSourceBindings(vhost, name string) ([]map[string]interface{}, error)
- func (c *APIClient) ListExchanges() ([]map[string]interface{}, error)
- func (c *APIClient) ListExtensions() ([]map[string]interface{}, error)
- func (c *APIClient) ListGlobalParameters() ([]map[string]interface{}, error)
- func (c *APIClient) ListNodes() ([]map[string]interface{}, error)
- func (c *APIClient) ListParameters(component, vhost string) ([]map[string]interface{}, error)
- func (c *APIClient) ListPermissions() ([]map[string]interface{}, error)
- func (c *APIClient) ListPolicies(vhost string) ([]map[string]interface{}, error)
- func (c *APIClient) ListQueues(vhost string) ([]map[string]interface{}, error)
- func (c *APIClient) ListUsers() ([]map[string]interface{}, error)
- func (c *APIClient) ListVhostChannels(name string) ([]map[string]interface{}, error)
- func (c *APIClient) ListVhostConnections(vhost string) ([]map[string]interface{}, error)
- func (c *APIClient) ListVhostConsumers(name string) ([]map[string]interface{}, error)
- func (c *APIClient) ListVhostExchanges(name string) ([]map[string]interface{}, error)
- func (c *APIClient) ListVhosts() ([]map[string]interface{}, error)
- func (c *APIClient) NewRequest(method string, paths interface{}, data interface{}) (*http.Request, error)
- func (c *APIClient) Node(name string, params map[string]string) (map[string]interface{}, error)
- func (c *APIClient) NodeHealthCheck(node string) error
- func (c *APIClient) Overview() (map[string]interface{}, error)
- func (c *APIClient) POST(paths interface{}, data interface{}) (*http.Response, error)
- func (c *APIClient) PUT(paths interface{}, data interface{}) (*http.Response, error)
- func (c *APIClient) Parameter(component, vhost, name string) (map[string]interface{}, error)
- func (c *APIClient) Permission(vhost, user string) (map[string]interface{}, error)
- func (c *APIClient) Policy(vhost, name string) (map[string]interface{}, error)
- func (c *APIClient) PurgeQueue(vhost, name string) error
- func (c *APIClient) Queue(vhost, name string) (map[string]interface{}, error)
- func (c *APIClient) QueueBindings(vhost, name string) ([]map[string]interface{}, error)
- func (c *APIClient) QueueCreateExchangeBinding(vhost, exchange, name, key string, args map[string]interface{}) (string, error)
- func (c *APIClient) QueueDeleteExchangeBinding(vhost, exchange, name, props string) error
- func (c *APIClient) QueueExchangeBinding(vhost, exchange, name, props string) (map[string]interface{}, error)
- func (c *APIClient) QueueExchangeBindings(vhost, exchange, name string) ([]map[string]interface{}, error)
- func (c *APIClient) QueueMessages(vhost, name string, params map[string]interface{}) ([]map[string]interface{}, error)
- func (c *APIClient) QuickRegisterQueue(vhost, name string, bindings map[string][]string) error
- func (c *APIClient) ScanByte(resp *http.Response, err error) ([]byte, error)
- func (c *APIClient) ScanCreate(resp *http.Response, err error) error
- func (c *APIClient) ScanDelete(resp *http.Response, err error) error
- func (c *APIClient) ScanMap(resp *http.Response, err error) (map[string]interface{}, error)
- func (c *APIClient) ScanSlice(resp *http.Response, err error) ([]map[string]interface{}, error)
- func (c *APIClient) ScanUpdate(resp *http.Response, err error) error
- func (c *APIClient) SetApi(api string) *APIClient
- func (c *APIClient) SetAuth(user, passwd string) *APIClient
- func (c *APIClient) User(name string) (map[string]interface{}, error)
- func (c *APIClient) UserPermissions(name string) ([]map[string]interface{}, error)
- func (c *APIClient) Vhost(name string) (map[string]interface{}, error)
- func (c *APIClient) VhostDefinitions(vhost string) (map[string]interface{}, error)
- func (c *APIClient) VhostPermissions(name string) ([]map[string]interface{}, error)
- func (c *APIClient) WhoAmI() (map[string]interface{}, error)
- type Connect
- func (c *Connect) APIClient() *APIClient
- func (c *Connect) Api() string
- func (c *Connect) ApplyPublisher(exchange string, routeKeys []string) (*PublisherTool, error)
- func (c *Connect) ApplyQueue(name string) *Queue
- func (c *Connect) ApplyQueueWithArgs(name string, args amqp.Table) *Queue
- func (c *Connect) Clone() *Connect
- func (c *Connect) Dial() (*amqp.Connection, error)
- func (c *Connect) DialConfig(config amqp.Config) (*amqp.Connection, error)
- func (c *Connect) DialTLS(config *tls.Config) (*amqp.Connection, error)
- func (c *Connect) Passwd() string
- func (c *Connect) QuickCreateExchange(name, kind string, durable bool) error
- func (c *Connect) QuickCreateQueue(name string, durable bool, args amqp.Table) error
- func (c *Connect) QuickDeleteExchange(name string) error
- func (c *Connect) QuickDeleteQueue(name string) error
- func (c *Connect) QuickExchangeBind(destination, key, source string) error
- func (c *Connect) QuickExchangeUnbind(destination, key, source string) error
- func (c *Connect) QuickPurgeQueue(name string) error
- func (c *Connect) QuickQueueBind(name, key, exchange string, args amqp.Table) error
- func (c *Connect) QuickQueueUnbind(name, key, exchange string, args amqp.Table) error
- func (c *Connect) Scheme() string
- func (c *Connect) User() string
- func (c *Connect) Vhost() string
- type ConnectConfig
- type ConsumerTool
- func (c *ConsumerTool) Close()
- func (c *ConsumerTool) Consume(nums int, handle func(amqp.Delivery))
- func (c *ConsumerTool) Link(prefetchCount int) (*amqp.Channel, error)
- func (c *ConsumerTool) Name() string
- func (c *ConsumerTool) Process(channel *amqp.Channel, consumerName string, quitSingle chan string, ...)
- func (c *ConsumerTool) SetName(name string) string
- type DefaultLog
- func (c *DefaultLog) Debug(format string, v ...interface{})
- func (c *DefaultLog) Error(format string, v ...interface{})
- func (c *DefaultLog) Fatal(format string, v ...interface{})
- func (c *DefaultLog) Info(format string, v ...interface{})
- func (c *DefaultLog) Panic(format string, v ...interface{})
- func (c *DefaultLog) Warn(format string, v ...interface{})
- type Logger
- func (c *Logger) Debug(format string, v ...interface{})
- func (c *Logger) Error(format string, v ...interface{})
- func (c *Logger) Fatal(format string, v ...interface{})
- func (c *Logger) Info(format string, v ...interface{})
- func (c *Logger) Panic(format string, v ...interface{})
- func (c *Logger) Set(instance interface{})
- func (c *Logger) Warn(format string, v ...interface{})
- type LoggerInterface
- type PublisherTool
- type Queue
- func (c *Queue) Api() string
- func (c *Queue) ApplyConsumer() (*ConsumerTool, error)
- func (c *Queue) Args() amqp.Table
- func (c *Queue) Bind(bind *QueueBind) error
- func (c *Queue) Binds(bindList []*QueueBind) error
- func (c *Queue) Clone(name string) *Queue
- func (c *Queue) Close()
- func (c *Queue) Consume(prefetchCount int, handle func(amqp.Delivery)) error
- func (c *Queue) Create() error
- func (c *Queue) Delete() error
- func (c *Queue) Ensure(bindList []*QueueBind) error
- func (c *Queue) Name() string
- func (c *Queue) Passwd() string
- func (c *Queue) Purge() error
- func (c *Queue) Scheme() string
- func (c *Queue) Unbind(bind *QueueBind) error
- func (c *Queue) User() string
- func (c *Queue) Vhost() string
- type QueueBind
- type QueueConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultClientTimeout time.Duration = 3 * time.Second //请求超时 DefaultTransportInsecureSkipVerify bool = false //是否忽略ssl验证 DefaultTransportDisableCompression bool = true //是否禁止压缩 )
Functions ¶
func APIAlivenessTest ¶
func APIChangeDefinitions ¶
func APIChannel ¶
func APIChnageClusterName ¶
func APIClusterName ¶
func APIConnection ¶
func APICreateExchange ¶
func APICreateParameter ¶
func APICreatePermission ¶
func APICreatePolicy ¶
func APICreateQueue ¶
func APICreateUser ¶
func APICreateVhost ¶
func APIDefinitions ¶
func APIDeleteExchange ¶
func APIDeleteParameter ¶
func APIDeletePermission ¶
func APIDeletePolicy ¶
func APIDeleteQueue ¶
func APIDeleteUser ¶
func APIDeleteVhost ¶
func APIExchange ¶
func APIExchangeBinding ¶
func APIExchangeBindings ¶
func APIExchangePublish ¶
func APIForceDeleteExchange ¶
func APIForceDeleteQueue ¶
func APIGlobalParameter ¶
func APIHealthCheck ¶
func APIListChannels ¶
func APIListConnections ¶
func APIListConsumers ¶
func APIListExchanges ¶
func APIListExtensions ¶
func APIListGlobalParameters ¶
func APIListNodes ¶
func APIListParameters ¶
func APIListPermissions ¶
func APIListPolicies ¶
func APIListQueues ¶
func APIListUsers ¶
func APIListVhostChannels ¶
func APIListVhostConnections ¶
func APIListVhostConsumers ¶
func APIListVhostExchanges ¶
func APIListVhosts ¶
func APINodeHealthCheck ¶
func APIOverview ¶
func APIParameter ¶
func APIPermission ¶
func APIPurgeQueue ¶
func APIQueueBindings ¶
func APIQueueExchangeBinding ¶
func APIQueueMessages ¶
func APIQuickRegisterQueue ¶
func APIUserPermissions ¶
func APIVhostDefinitions ¶
func APIVhostPermissions ¶
func GenerateConsumerName ¶
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
func NewAPIClient ¶
func (*APIClient) APIBindings ¶
func (*APIClient) AlivenessTest ¶
func (*APIClient) ChangeClusterName ¶
func (*APIClient) ChangeDefinitions ¶
func (*APIClient) ChangeVhostDefinitions ¶
func (*APIClient) CheckUserPasswordHash ¶
func (*APIClient) ClusterName ¶
func (*APIClient) Connection ¶
func (*APIClient) CreateExchange ¶
func (*APIClient) CreateGlobalParameter ¶
func (*APIClient) CreateParameter ¶
func (*APIClient) CreatePermission ¶
func (*APIClient) CreatePolicy ¶
func (*APIClient) CreateQueue ¶
func (*APIClient) CreateUser ¶
func (*APIClient) Definitions ¶
func (*APIClient) DeleteExchange ¶
func (*APIClient) DeleteGlobalParameter ¶
func (*APIClient) DeleteParameter ¶
func (*APIClient) DeletePermission ¶
func (*APIClient) DeletePolicy ¶
func (*APIClient) DeleteQueue ¶
func (*APIClient) DeleteUser ¶
func (*APIClient) DeleteVhost ¶
func (*APIClient) ExchangeBinding ¶
func (*APIClient) ExchangeBindings ¶
func (*APIClient) ExchangeCreateBinding ¶
func (*APIClient) ExchangeDeleteBinding ¶
func (*APIClient) ExchangePublish ¶
func (*APIClient) ForceDeleteConnection ¶
func (*APIClient) ForceDeleteExchange ¶
func (*APIClient) ForceDeleteQueue ¶
func (*APIClient) GenerateUserPasswordHash ¶
func (*APIClient) GlobalParameter ¶
func (*APIClient) HealthCheck ¶
func (*APIClient) ListChannels ¶
func (*APIClient) ListConnectionChannels ¶
func (*APIClient) ListConnections ¶
func (*APIClient) ListConsumers ¶
func (*APIClient) ListExchangeDestinationBindings ¶
func (*APIClient) ListExchangeSourceBindings ¶
func (*APIClient) ListExchanges ¶
func (*APIClient) ListExtensions ¶
func (*APIClient) ListGlobalParameters ¶
func (*APIClient) ListParameters ¶
func (*APIClient) ListPermissions ¶
func (*APIClient) ListPolicies ¶
func (*APIClient) ListQueues ¶
func (*APIClient) ListVhostChannels ¶
func (*APIClient) ListVhostConnections ¶
func (*APIClient) ListVhostConsumers ¶
func (*APIClient) ListVhostExchanges ¶
func (*APIClient) ListVhosts ¶
func (*APIClient) NewRequest ¶
func (*APIClient) NodeHealthCheck ¶
func (*APIClient) Permission ¶
func (*APIClient) PurgeQueue ¶
func (*APIClient) QueueBindings ¶
func (*APIClient) QueueCreateExchangeBinding ¶
func (*APIClient) QueueDeleteExchangeBinding ¶
func (*APIClient) QueueExchangeBinding ¶
func (*APIClient) QueueExchangeBindings ¶
func (*APIClient) QueueMessages ¶
func (*APIClient) QuickRegisterQueue ¶
func (*APIClient) UserPermissions ¶
func (*APIClient) VhostDefinitions ¶
func (*APIClient) VhostPermissions ¶
type Connect ¶
type Connect struct {
// contains filtered or unexported fields
}
func NewConnect ¶
func NewConnect(config ConnectConfig) *Connect
func (*Connect) ApplyPublisher ¶
func (c *Connect) ApplyPublisher(exchange string, routeKeys []string) (*PublisherTool, error)
func (*Connect) ApplyQueue ¶
func (*Connect) ApplyQueueWithArgs ¶
func (*Connect) DialConfig ¶
func (*Connect) QuickCreateExchange ¶
func (*Connect) QuickCreateQueue ¶
func (*Connect) QuickDeleteExchange ¶
func (*Connect) QuickDeleteQueue ¶
func (*Connect) QuickExchangeBind ¶
func (*Connect) QuickExchangeUnbind ¶
func (*Connect) QuickPurgeQueue ¶
func (*Connect) QuickQueueBind ¶
func (*Connect) QuickQueueUnbind ¶
type ConnectConfig ¶
type ConnectConfig struct { Host string `json:"host" yaml:"host"` //127.0.0.1:5672 Api string `json:"api" yaml:"api"` //http://127.0.0.1:15672 User string `json:"user" yaml:"user"` //username Passwd string `json:"passwd" yaml:"passwd"` //passwd Vhost string `json:"vhost" yaml:"vhost"` //vhost MetaData map[string]interface{} `json:"metadata" yaml:"metadata"` //metadata }
func (*ConnectConfig) Scheme ¶
func (c *ConnectConfig) Scheme() string
type ConsumerTool ¶
func NewConsumerTool ¶
func NewConsumerTool(url, queue string) (*ConsumerTool, error)
func (*ConsumerTool) Close ¶
func (c *ConsumerTool) Close()
func (*ConsumerTool) Name ¶
func (c *ConsumerTool) Name() string
func (*ConsumerTool) SetName ¶
func (c *ConsumerTool) SetName(name string) string
type DefaultLog ¶
type DefaultLog struct {
LoggerInterface
}
func (*DefaultLog) Debug ¶
func (c *DefaultLog) Debug(format string, v ...interface{})
func (*DefaultLog) Error ¶
func (c *DefaultLog) Error(format string, v ...interface{})
func (*DefaultLog) Fatal ¶
func (c *DefaultLog) Fatal(format string, v ...interface{})
func (*DefaultLog) Info ¶
func (c *DefaultLog) Info(format string, v ...interface{})
func (*DefaultLog) Panic ¶
func (c *DefaultLog) Panic(format string, v ...interface{})
func (*DefaultLog) Warn ¶
func (c *DefaultLog) Warn(format string, v ...interface{})
type LoggerInterface ¶
type PublisherTool ¶
func NewPublisherTool ¶
func NewPublisherTool(url, exchange string, routeKeys []string) (*PublisherTool, error)
func (*PublisherTool) GetSafeChannel ¶
func (c *PublisherTool) GetSafeChannel(route string) (*amqp.Channel, error)
func (*PublisherTool) Publish ¶
func (c *PublisherTool) Publish(route string, msg amqp.Publishing)
func (*PublisherTool) PublishExt ¶
func (c *PublisherTool) PublishExt(route, fix string, msg amqp.Publishing)
func (*PublisherTool) SafePublish ¶
func (c *PublisherTool) SafePublish(route string, msg amqp.Publishing) error
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) ApplyConsumer ¶
func (c *Queue) ApplyConsumer() (*ConsumerTool, error)
Click to show internal directories.
Click to hide internal directories.