Documentation
¶
Overview ¶
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func BuildWithProjectGroup(origin string, groupPrefix string) string
- func CheckGroup(group string) error
- func CheckMessage(msg *message.Message, maxSize int) error
- func CheckTopic(topic string) error
- func ClearProjectGroup(origin string, groupPrefix string) string
- func Decode(data []byte, v interface{}) error
- func Encode(v interface{}) ([]byte, error)
- func LocalAddress() (laddr string, err error)
- type Callback
- type CommunicationMode
- type FindBrokerResult
- type PullResult
- type PullStatus
- type Result
- type ResultStatus
- type SRVStatus
Constants ¶
const ( CHARACTER_MAX_LENGTH = 255 VALID_PATTERN_STR = "^[%|a-zA-Z0-9_-]+$" )
const (
VIRTUAL_APPGROUP_PREFIX = "%%PROJECT_%s%%"
)
Variables ¶
This section is empty.
Functions ¶
func BuildWithProjectGroup ¶
func CheckGroup ¶
func CheckTopic ¶
func ClearProjectGroup ¶
func LocalAddress ¶
Types ¶
type CommunicationMode ¶
type CommunicationMode int
const ( SYNC CommunicationMode = iota ASYNC ONEWAY )
func (CommunicationMode) String ¶
func (cm CommunicationMode) String() string
type FindBrokerResult ¶
FindBrokerResult
type PullResult ¶
type PullResult struct {
Status PullStatus
NextBeginOffset int64
MinOffset int64
MaxOffset int64
Msgs []*message.MessageExt
}
type PullStatus ¶
type PullStatus int
const ( // Founded FOUND PullStatus = iota // No new message can be pull NO_NEW_MSG // Filtering results can not match NO_MATCHED_MSG // Illegal offset,may be too big or too small OFFSET_ILLEGAL )
func (PullStatus) String ¶
func (status PullStatus) String() string
type Result ¶
type Result struct {
Status ResultStatus
MsgId string
Queue *message.MessageQueue
QueueOffset int64
TransId string
}
func NewResult ¶
func NewResult(groupPrefix string, status ResultStatus, msgId string, messageQueue *message.MessageQueue, queueOffset int64, transId string) *Result
type ResultStatus ¶
type ResultStatus int
const ( SEND_OK ResultStatus = iota FLUSH_DISK_TIMEOUT FLUSH_SLAVE_TIMEOUT SLAVE_NOT_AVAILABLE SEND_UNKNOW )
func (ResultStatus) String ¶
func (status ResultStatus) String() string