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 ¶
- type BrokerData
- type BrokerDatas
- type BrokerLiveInfo
- type QueueData
- type QueueDatas
- type TopicConfig
- type TopicConfigSerializeWrapper
- type TopicConfigTable
- func (table *TopicConfigTable) Clear()
- func (table *TopicConfigTable) ClearAndPutAll(topicConfigTable map[string]*TopicConfig)
- func (table *TopicConfigTable) Foreach(fn func(k string, v *TopicConfig))
- func (table *TopicConfigTable) ForeachUpdate(fn func(k string, v *TopicConfig))
- func (table *TopicConfigTable) Get(k string) *TopicConfig
- func (table *TopicConfigTable) Keys() []string
- func (table *TopicConfigTable) Put(k string, v *TopicConfig) *TopicConfig
- func (table *TopicConfigTable) PutAll(topicConfigTable map[string]*TopicConfig)
- func (table *TopicConfigTable) Remove(k string) *TopicConfig
- func (table *TopicConfigTable) Size() int
- func (table *TopicConfigTable) String() string
- type TopicRouteData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerData ¶
type BrokerData struct { BrokerName string `json:"brokerName"` BrokerAddrs map[int]string `json:"brokerAddrs"` // contains filtered or unexported fields }
func NewBrokerData ¶
func NewBrokerData(brokerName string) *BrokerData
func (*BrokerData) CloneBrokerData ¶
func (bd *BrokerData) CloneBrokerData() *BrokerData
func (*BrokerData) Equals ¶
func (brokerData *BrokerData) Equals(v interface{}) bool
func (*BrokerData) SelectBrokerAddr ¶
func (bd *BrokerData) SelectBrokerAddr() string
func (*BrokerData) String ¶
func (bd *BrokerData) String() string
type BrokerDatas ¶
type BrokerDatas []*BrokerData
func (BrokerDatas) Len ¶
func (bds BrokerDatas) Len() int
func (BrokerDatas) Less ¶
func (bds BrokerDatas) Less(i, j int) bool
func (BrokerDatas) Swap ¶
func (bds BrokerDatas) Swap(i, j int)
type BrokerLiveInfo ¶
type BrokerLiveInfo struct { LastUpdateTimestamp int64 DataVersion *basis.DataVersion Ctx core.Context HaServerAddr string }
BrokerLiveInfo 活动broker存储结构
func NewBrokerLiveInfo ¶
func NewBrokerLiveInfo(dataVersion *basis.DataVersion, haServerAddr string, ctx core.Context) *BrokerLiveInfo
NewBrokerLiveInfo 初始化BrokerLiveInfo
type QueueData ¶
type QueueData struct { BrokerName string `json:"brokerName"` ReadQueueNums int `json:"readQueueNums"` WriteQueueNums int `json:"writeQueueNums"` Perm int `json:"perm"` TopicSynFlag int `json:"topicSynFlag"` }
func NewQueueData ¶
func NewQueueData(brokerName string, topicConfig *TopicConfig) *QueueData
type QueueDatas ¶
type QueueDatas []*QueueData
func (QueueDatas) Len ¶
func (qds QueueDatas) Len() int
func (QueueDatas) Less ¶
func (qds QueueDatas) Less(i, j int) bool
func (QueueDatas) Swap ¶
func (qds QueueDatas) Swap(i, j int)
type TopicConfig ¶
type TopicConfig struct { Separator string TopicName string `json:"topicName"` ReadQueueNums int32 `json:"readQueueNums"` WriteQueueNums int32 `json:"writeQueueNums"` Perm int `json:"perm"` TpFilterType basis.TopicFilterType `json:"topicFilterType"` TopicSysFlag int `json:"topicSysFlag"` Order bool `json:"order"` }
func NewCustomTopicConfig ¶
func NewCustomTopicConfig(topicName string, readQueueNums, writeQueueNums int32, topicSysFlag int, filterType ...basis.TopicFilterType) *TopicConfig
func NewDefaultTopicConfig ¶
func NewDefaultTopicConfig(topicName string, readQueueNums, writeQueueNums int32, perm int, filterType basis.TopicFilterType) *TopicConfig
func NewTopicConfig ¶
func NewTopicConfig(topicName string) *TopicConfig
func (*TopicConfig) PermString ¶
func (tc *TopicConfig) PermString() string
func (*TopicConfig) String ¶
func (tc *TopicConfig) String() string
type TopicConfigSerializeWrapper ¶
type TopicConfigSerializeWrapper struct { TpConfigTable *TopicConfigTable `json:"topicConfigTable"` DataVersion *basis.DataVersion `json:"dataVersion"` }
TopicConfigSerializeWrapper topic Author gaoyanlei Since 2017/8/11
func NewTopicConfigSerializeWrapper ¶
func NewTopicConfigSerializeWrapper(dataVersion ...*basis.DataVersion) *TopicConfigSerializeWrapper
NewTopicConfigSerializeWrapper 格式化 Author: tianyuliang Since: 2017/10/21
func (*TopicConfigSerializeWrapper) String ¶
func (wrap *TopicConfigSerializeWrapper) String() string
String 格式化 Author: tianyuliang Since: 2017/10/21
type TopicConfigTable ¶
type TopicConfigTable struct { TopicConfigs map[string]*TopicConfig `json:"topicConfigs"` // contains filtered or unexported fields }
func NewTopicConfigTable ¶
func NewTopicConfigTable() *TopicConfigTable
func (*TopicConfigTable) Clear ¶
func (table *TopicConfigTable) Clear()
Clear 清空map author rongzhihong since 2017/9/18
func (*TopicConfigTable) ClearAndPutAll ¶
func (table *TopicConfigTable) ClearAndPutAll(topicConfigTable map[string]*TopicConfig)
ClearAndPutAll 清空map后,再putAll author rongzhihong since 2017/9/18
func (*TopicConfigTable) Foreach ¶
func (table *TopicConfigTable) Foreach(fn func(k string, v *TopicConfig))
func (*TopicConfigTable) ForeachUpdate ¶
func (table *TopicConfigTable) ForeachUpdate(fn func(k string, v *TopicConfig))
func (*TopicConfigTable) Get ¶
func (table *TopicConfigTable) Get(k string) *TopicConfig
func (*TopicConfigTable) Keys ¶
func (table *TopicConfigTable) Keys() []string
func (*TopicConfigTable) Put ¶
func (table *TopicConfigTable) Put(k string, v *TopicConfig) *TopicConfig
func (*TopicConfigTable) PutAll ¶
func (table *TopicConfigTable) PutAll(topicConfigTable map[string]*TopicConfig)
PutAll put all author rongzhihong since 2017/9/18
func (*TopicConfigTable) Remove ¶
func (table *TopicConfigTable) Remove(k string) *TopicConfig
func (*TopicConfigTable) Size ¶
func (table *TopicConfigTable) Size() int
func (*TopicConfigTable) String ¶
func (table *TopicConfigTable) String() string
String 打印TopicConfigTable结构体的数据 Author: tianyuliang Since: 2017/10/3
type TopicRouteData ¶
type TopicRouteData struct { OrderTopicConf string `json:"orderTopicConf"` QueueDatas []*QueueData `json:"queueDatas"` BrokerDatas []*BrokerData `json:"brokerDatas"` FilterServerTable map[string][]string `json:"filterServerTable"` }
func NewTopicRouteData ¶
func NewTopicRouteData() *TopicRouteData
func (*TopicRouteData) CloneTopicRouteData ¶
func (trd *TopicRouteData) CloneTopicRouteData() *TopicRouteData
func (*TopicRouteData) Decode ¶
func (trd *TopicRouteData) Decode(data []byte) error
func (*TopicRouteData) Encode ¶
func (trd *TopicRouteData) Encode() ([]byte, error)
func (*TopicRouteData) Equals ¶
func (routeData *TopicRouteData) Equals(v interface{}) bool
func (*TopicRouteData) String ¶
func (trd *TopicRouteData) String() string