basis

package
v0.0.0-...-d86056c Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: Apache-2.0 Imports: 9 Imported by: 4

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.

Index

Constants

View Source
const (
	MASTER_ID                   = 0
	SELF_TEST_TOPIC             = "SELF_TEST_TOPIC"
	DEFAULT_TOPIC               = "MY_DEFAULT_TOPIC"
	BENCHMARK_TOPIC             = "BenchmarkTest"
	OFFSET_MOVED_EVENT          = "OFFSET_MOVED_EVENT"
	DEFAULT_PRODUCER_GROUP      = "DEFAULT_PRODUCER"
	DEFAULT_CONSUMER_GROUP      = "DEFAULT_CONSUMER"
	TOOLS_CONSUMER_GROUP        = "TOOLS_CONSUMER"
	FILTERSRV_CONSUMER_GROUP    = "FILTERSRV_CONSUMER"
	CLIENT_INNER_PRODUCER_GROUP = "CLIENT_INNER_PRODUCER"
	SELF_TEST_CONSUMER_GROUP    = "SELF_TEST_C_GROUP"
	RETRY_GROUP_TOPIC_PREFIX    = "%RETRY%"
	DLQ_GROUP_TOPIC_PREFIX      = "%DLQ%"
)

Variables

This section is empty.

Functions

func CompareAndIncreaseOnly

func CompareAndIncreaseOnly(target *int64, value int64) bool

func Compress

func Compress(src []byte) []byte

压缩

func TagsString2tagsCode

func TagsString2tagsCode(filterType TopicFilterType, tags string) int64

func UnCompress

func UnCompress(src []byte) []byte

解压

Types

type DataVersion

type DataVersion struct {
	Timestamp int64 `json:"timestamp"`
	Counter   int64 `json:"counter"`
}

func NewDataVersion

func NewDataVersion(timestamp ...int64) *DataVersion

func (*DataVersion) AssignNewOne

func (dv *DataVersion) AssignNewOne(dataVersion DataVersion)

func (*DataVersion) Equals

func (dv *DataVersion) Equals(dataVersion *DataVersion) bool

func (*DataVersion) Json

func (dv *DataVersion) Json() string

func (*DataVersion) NextVersion

func (dv *DataVersion) NextVersion()

func (*DataVersion) String

func (dv *DataVersion) String() string

type TopicFilterType

type TopicFilterType int

TopicFilterType Topic过滤方式,默认为单Tag过滤 Author gaoyanlei Since 2017/8/9

const (
	SINGLE_TAG TopicFilterType = iota // 每个消息只能有一个Tag
	MULTI_TAG                         // (1)每个消息可以有多个Tag(暂时不支持,后续视情况支持)(2)为什么暂时不支持?(3)此功能可能会对用户造成困扰,且方案并不完美,所以暂不支持
)

func ParseTopicFilterType

func ParseTopicFilterType(sysFlag int32) TopicFilterType

func (TopicFilterType) String

func (tft TopicFilterType) String() string

String

Jump to

Keyboard shortcuts

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