broker

package
v0.0.0-...-8a04a08 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package broker is a generated protocol buffer package.

It is generated from these files:

message.proto

It has these top-level messages:

Message

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	Publish(topic string, msg *Message) error
	Subscribe(topic, queue, appId string, size int, h Handler)
	Close()
	Connect() error
}

type Handler

type Handler func(topic string, msg *Message) (int, error)

type Message

type Message struct {
	Id     string            `protobuf:"bytes,1,opt,proto3" json:"Id,omitempty"`
	Header map[string]string `` /* 134-byte string literal not displayed */
	Retry  int32             `protobuf:"varint,3,opt,proto3" json:"Retry,omitempty"`
	Body   []byte            `protobuf:"bytes,4,opt,proto3" json:"Body,omitempty"`
}

func NewMessage

func NewMessage(meta map[string]string, body []byte) *Message

func (*Message) GetHeader

func (m *Message) GetHeader() map[string]string

func (*Message) Marshal

func (m *Message) Marshal() (data []byte, err error)

func (*Message) MarshalTo

func (m *Message) MarshalTo(data []byte) (n int, err error)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) Size

func (m *Message) Size() (n int)

func (*Message) String

func (m *Message) String() string

func (*Message) Unmarshal

func (m *Message) Unmarshal(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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