rotorcore

package module
v0.0.0-...-21229cc Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

README

rotorcore

Core logic library for rotor FMQP broker

Documentation

Overview

This file is part of rotorcore.

rotorcore is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

rotorcore is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with rotorcore. If not, see <https://www.gnu.org/licenses/>.

This file is part of rotorcore.

rotorcore is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

rotorcore is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with rotorcore. If not, see <https://www.gnu.org/licenses/>.

This file is part of rotorcore.

rotorcore is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

rotorcore is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with rotorcore. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

View Source
const (
	ConnectEvent EventType = 0
	MessageEvent           = 1
	DisconnEvent           = 2
	SecondTimer            = 3
)

Variables

This section is empty.

Functions

func SendWithDrop

func SendWithDrop(ch MsgChannel, msg gofmqp.Message)

Types

type Event

type Event struct {
	ID      gofmqp.Id
	Type    EventType
	Channel *MsgChannel
	Msg     *gofmqp.Message
}

type EventChannel

type EventChannel chan Event

type EventType

type EventType uint8

type IdGenerator

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

func NewIdGenerator

func NewIdGenerator() IdGenerator

func (*IdGenerator) GetId

func (gen *IdGenerator) GetId() gofmqp.Id

type MsgChannel

type MsgChannel chan gofmqp.Message

type Router

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

func NewRouter

func NewRouter(cf uint64) Router

func (*Router) AddClient

func (router *Router) AddClient(client gofmqp.Id, chn MsgChannel)

func (*Router) RemoveClient

func (router *Router) RemoveClient(client gofmqp.Id)

func (*Router) Route

func (router *Router) Route(client gofmqp.Id, msg gofmqp.Message)

Jump to

Keyboard shortcuts

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