stub

package
v0.0.0-...-1b3fcde Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

github.com/donnie4w/tldb

Code generated by Thrift Compiler (0.18.1). DO NOT EDIT. Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

github.com/donnie4w/tldb

Index

Constants

This section is empty.

Variables

View Source
var DataBeen_Uuids_DEFAULT []int64
View Source
var DataBeen_Value_DEFAULT []byte
View Source
var IdxStub_IdxMap_DEFAULT map[string]string
View Source
var MqBean_Msg_DEFAULT []byte
View Source
var TableParam_Ids_DEFAULT []int64
View Source
var TableParam_IdxValue_DEFAULT []byte
View Source
var TableParam_IdxValues_DEFAULT [][]byte
View Source
var TableParam_StubArray_DEFAULT []*TableStub
View Source
var TableStub_Field_DEFAULT map[string][]byte
View Source
var TableStub_Idx_DEFAULT map[string]int8

Functions

func EncodeTableStub

func EncodeTableStub(ts *TableStub) []byte

Types

type DataBeen

type DataBeen struct {
	IsLocal bool    `thrift:"IsLocal,1,required" db:"IsLocal" json:"IsLocal"`
	Uuids   []int64 `thrift:"Uuids,2" db:"Uuids" json:"Uuids,omitempty"`
	Value   []byte  `thrift:"Value,3" db:"Value" json:"Value,omitempty"`
}

Attributes:

  • IsLocal
  • Uuids
  • Value

func NewDataBeen

func NewDataBeen() *DataBeen

func (*DataBeen) Equals

func (p *DataBeen) Equals(other *DataBeen) bool

func (*DataBeen) GetIsLocal

func (p *DataBeen) GetIsLocal() bool

func (*DataBeen) GetUuids

func (p *DataBeen) GetUuids() []int64

func (*DataBeen) GetValue

func (p *DataBeen) GetValue() []byte

func (*DataBeen) IsSetUuids

func (p *DataBeen) IsSetUuids() bool

func (*DataBeen) IsSetValue

func (p *DataBeen) IsSetValue() bool

func (*DataBeen) Read

func (p *DataBeen) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*DataBeen) ReadField1

func (p *DataBeen) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*DataBeen) ReadField2

func (p *DataBeen) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*DataBeen) ReadField3

func (p *DataBeen) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*DataBeen) String

func (p *DataBeen) String() string

func (*DataBeen) Validate

func (p *DataBeen) Validate() error

func (*DataBeen) Write

func (p *DataBeen) Write(ctx context.Context, oprot thrift.TProtocol) error

type DecodeStub

type DecodeStub struct {
	Bytes []byte
	// contains filtered or unexported fields
}

func (*DecodeStub) ToIdx

func (this *DecodeStub) ToIdx() map[string]int8

func (*DecodeStub) ToInt64

func (this *DecodeStub) ToInt64() (_r int64)

func (*DecodeStub) ToMapField

func (this *DecodeStub) ToMapField() map[string][]byte

func (*DecodeStub) ToStrArray

func (this *DecodeStub) ToStrArray() []string

func (*DecodeStub) ToString

func (this *DecodeStub) ToString() (_r string)

type EncodeStub

type EncodeStub struct {
	Buf *Buffer
}

func NewEncodeStub

func NewEncodeStub() *EncodeStub

func (*EncodeStub) IdxLen

func (this *EncodeStub) IdxLen(m map[string]int8) (_r int32)

func (*EncodeStub) Int64ToBytes

func (this *EncodeStub) Int64ToBytes(v int64)

func (*EncodeStub) MapFieldLen

func (this *EncodeStub) MapFieldLen(m map[string][]byte) (_r []byte)

func (*EncodeStub) MapFieldToBytes

func (this *EncodeStub) MapFieldToBytes(m map[string][]byte)

func (*EncodeStub) MapIdxToBytes

func (this *EncodeStub) MapIdxToBytes(m map[string]int8)

func (*EncodeStub) StringArrayLen

func (this *EncodeStub) StringArrayLen(arr []string) (_r int32)

func (*EncodeStub) StringArrayToBytes

func (this *EncodeStub) StringArrayToBytes(arr []string)

func (*EncodeStub) StringToBytes

func (this *EncodeStub) StringToBytes(s string)

func (*EncodeStub) ToBytes

func (this *EncodeStub) ToBytes() []byte

type IdxStub

type IdxStub struct {
	IdxMap map[string]string `thrift:"IdxMap,1" db:"IdxMap" json:"IdxMap,omitempty"`
}

Attributes:

  • IdxMap

func NewIdxStub

func NewIdxStub() *IdxStub

func (*IdxStub) Equals

func (p *IdxStub) Equals(other *IdxStub) bool

func (*IdxStub) GetIdxMap

func (p *IdxStub) GetIdxMap() map[string]string

func (*IdxStub) IsSetIdxMap

func (p *IdxStub) IsSetIdxMap() bool

func (*IdxStub) Read

func (p *IdxStub) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*IdxStub) ReadField1

func (p *IdxStub) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*IdxStub) String

func (p *IdxStub) String() string

func (*IdxStub) Validate

func (p *IdxStub) Validate() error

func (*IdxStub) Write

func (p *IdxStub) Write(ctx context.Context, oprot thrift.TProtocol) error

type Merge

type Merge[T any, V any] interface {
	Add(t T)
	Del(id int64)
	Get(id int64) (_r T, ok bool)
	Len() int64
	MergeSize(size int8)
	SetZlib(zlib bool)
	CallBack(cancelfunc func() bool, f func(v V) error) (err error)
}

type MergeBean

type MergeBean struct {
	BeanList [][]byte `thrift:"beanList,1,required" db:"beanList" json:"beanList"`
}

Attributes:

  • BeanList

func NewMergeBean

func NewMergeBean() *MergeBean

func (*MergeBean) Equals

func (p *MergeBean) Equals(other *MergeBean) bool

func (*MergeBean) GetBeanList

func (p *MergeBean) GetBeanList() [][]byte

func (*MergeBean) Read

func (p *MergeBean) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*MergeBean) ReadField1

func (p *MergeBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*MergeBean) String

func (p *MergeBean) String() string

func (*MergeBean) Validate

func (p *MergeBean) Validate() error

func (*MergeBean) Write

func (p *MergeBean) Write(ctx context.Context, oprot thrift.TProtocol) error

type MqBean

type MqBean struct {
	Topic string `thrift:"topic,1,required" db:"topic" json:"topic"`
	ID    int64  `thrift:"id,2,required" db:"id" json:"id"`
	Msg   []byte `thrift:"msg,3" db:"msg" json:"msg,omitempty"`
}

Attributes:

  • Topic
  • ID
  • Msg

func NewMqBean

func NewMqBean() *MqBean

func (*MqBean) Equals

func (p *MqBean) Equals(other *MqBean) bool

func (*MqBean) GetID

func (p *MqBean) GetID() int64

func (*MqBean) GetMsg

func (p *MqBean) GetMsg() []byte

func (*MqBean) GetTopic

func (p *MqBean) GetTopic() string

func (*MqBean) IsSetMsg

func (p *MqBean) IsSetMsg() bool

func (*MqBean) Read

func (p *MqBean) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*MqBean) ReadField1

func (p *MqBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*MqBean) ReadField2

func (p *MqBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*MqBean) ReadField3

func (p *MqBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*MqBean) String

func (p *MqBean) String() string

func (*MqBean) Validate

func (p *MqBean) Validate() error

func (*MqBean) Write

func (p *MqBean) Write(ctx context.Context, oprot thrift.TProtocol) error

type Pool

type Pool[T any] interface {
	Get(size int) T
	Put(t T) (ok bool)
}

type RemoteNode

type RemoteNode struct {
	Addr      string
	UUID      int64
	Host      string
	AdminAddr string
	MQAddr    string
	CliAddr   string
	Stat      int8
	StatDesc  string
}

type Server

type Server interface {
	Serve() (err error)
	Close() (err error)
}

type TableParam

type TableParam struct {
	Start     int64        `thrift:"start,1,required" db:"start" json:"start"`
	Limit     int64        `thrift:"limit,2,required" db:"limit" json:"limit"`
	TableName string       `thrift:"tableName,3,required" db:"tableName" json:"tableName"`
	IdxName   string       `thrift:"idxName,4,required" db:"idxName" json:"idxName"`
	IdxValue  []byte       `thrift:"idxValue,5" db:"idxValue" json:"idxValue,omitempty"`
	IdxValues [][]byte     `thrift:"idxValues,6" db:"idxValues" json:"idxValues,omitempty"`
	Stub      *TableStub   `thrift:"stub,7" db:"stub" json:"stub,omitempty"`
	StubArray []*TableStub `thrift:"stubArray,8" db:"stubArray" json:"stubArray,omitempty"`
	TopicKey  string       `thrift:"topicKey,9,required" db:"topicKey" json:"topicKey"`
	Seq       int64        `thrift:"seq,10,required" db:"seq" json:"seq"`
	Err       string       `thrift:"err,11,required" db:"err" json:"err"`
	Ids       []int64      `thrift:"ids,12" db:"ids" json:"ids,omitempty"`
}

Attributes:

  • Start
  • Limit
  • TableName
  • IdxName
  • IdxValue
  • IdxValues
  • Stub
  • StubArray
  • TopicKey
  • Seq
  • Err
  • Ids

func NewTableParam

func NewTableParam() *TableParam

func (*TableParam) Equals

func (p *TableParam) Equals(other *TableParam) bool

func (*TableParam) GetErr

func (p *TableParam) GetErr() string

func (*TableParam) GetIds

func (p *TableParam) GetIds() []int64

func (*TableParam) GetIdxName

func (p *TableParam) GetIdxName() string

func (*TableParam) GetIdxValue

func (p *TableParam) GetIdxValue() []byte

func (*TableParam) GetIdxValues

func (p *TableParam) GetIdxValues() [][]byte

func (*TableParam) GetLimit

func (p *TableParam) GetLimit() int64

func (*TableParam) GetSeq

func (p *TableParam) GetSeq() int64

func (*TableParam) GetStart

func (p *TableParam) GetStart() int64

func (*TableParam) GetStub

func (p *TableParam) GetStub() *TableStub

func (*TableParam) GetStubArray

func (p *TableParam) GetStubArray() []*TableStub

func (*TableParam) GetTableName

func (p *TableParam) GetTableName() string

func (*TableParam) GetTopicKey

func (p *TableParam) GetTopicKey() string

func (*TableParam) IsSetIds

func (p *TableParam) IsSetIds() bool

func (*TableParam) IsSetIdxValue

func (p *TableParam) IsSetIdxValue() bool

func (*TableParam) IsSetIdxValues

func (p *TableParam) IsSetIdxValues() bool

func (*TableParam) IsSetStub

func (p *TableParam) IsSetStub() bool

func (*TableParam) IsSetStubArray

func (p *TableParam) IsSetStubArray() bool

func (*TableParam) Read

func (p *TableParam) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField1

func (p *TableParam) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField10

func (p *TableParam) ReadField10(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField11

func (p *TableParam) ReadField11(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField12

func (p *TableParam) ReadField12(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField2

func (p *TableParam) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField3

func (p *TableParam) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField4

func (p *TableParam) ReadField4(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField5

func (p *TableParam) ReadField5(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField6

func (p *TableParam) ReadField6(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField7

func (p *TableParam) ReadField7(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField8

func (p *TableParam) ReadField8(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) ReadField9

func (p *TableParam) ReadField9(ctx context.Context, iprot thrift.TProtocol) error

func (*TableParam) String

func (p *TableParam) String() string

func (*TableParam) Validate

func (p *TableParam) Validate() error

func (*TableParam) Write

func (p *TableParam) Write(ctx context.Context, oprot thrift.TProtocol) error

type TableStub

type TableStub struct {
	Tablename string            `thrift:"Tablename,1,required" db:"Tablename" json:"Tablename"`
	ID        int64             `thrift:"Id,2,required" db:"Id" json:"Id"`
	Idx       map[string]int8   `thrift:"Idx,3" db:"Idx" json:"Idx,omitempty"`
	Field     map[string][]byte `thrift:"Field,4" db:"Field" json:"Field,omitempty"`
}

Attributes:

  • Tablename
  • ID
  • Idx
  • Field
var TableParam_Stub_DEFAULT *TableStub

func DecodeTableStub

func DecodeTableStub(bs []byte) (ts *TableStub)

func NewTableStub

func NewTableStub() *TableStub

func (*TableStub) Equals

func (p *TableStub) Equals(other *TableStub) bool

func (*TableStub) GetField

func (p *TableStub) GetField() map[string][]byte

func (*TableStub) GetID

func (p *TableStub) GetID() int64

func (*TableStub) GetIdx

func (p *TableStub) GetIdx() map[string]int8

func (*TableStub) GetTablename

func (p *TableStub) GetTablename() string

func (*TableStub) IsSetField

func (p *TableStub) IsSetField() bool

func (*TableStub) IsSetIdx

func (p *TableStub) IsSetIdx() bool

func (*TableStub) Read

func (p *TableStub) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*TableStub) ReadField1

func (p *TableStub) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*TableStub) ReadField2

func (p *TableStub) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*TableStub) ReadField3

func (p *TableStub) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*TableStub) ReadField4

func (p *TableStub) ReadField4(ctx context.Context, iprot thrift.TProtocol) error

func (*TableStub) String

func (p *TableStub) String() string

func (*TableStub) Validate

func (p *TableStub) Validate() error

func (*TableStub) Write

func (p *TableStub) Write(ctx context.Context, oprot thrift.TProtocol) error

Jump to

Keyboard shortcuts

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