Versions in this module Expand all Collapse all v5 v5.0.6 Jul 30, 2020 v5.0.5 Feb 26, 2021 v5.0.3 Jul 30, 2020 v5.0.2 Jan 20, 2020 v5.0.1 Jan 16, 2020 Changes in this version + var DefaultFirstPk = "TimelineId" + var DefaultSecondPk = "Sequence" + var DefaultStreamAdapter = &StreamMessageAdapter + var ErrMisuse = errors.New("misuse") + var ErrUnexpected = errors.New("unexpected") + var ErrorDone = errors.New("done") + var MinTTL = 86400 + type Api interface + BatchStore func(message Message) (*promise.Future, error) + Delete func(sequenceId int64) error + Load func(sequenceId int64) (Message, error) + Scan func(param *ScanParameter) *Iterator + Store func(message Message) (int64, error) + Update func(sequenceId int64, message Message) error + type ColumnMap struct + func FromMap(mm map[string]interface{}) *ColumnMap + func LoadColumnMap(attrs []*tablestore.AttributeColumn) *ColumnMap + func NewColumnMap() *ColumnMap + func (cm *ColumnMap) AddAnyColumn(key string, val interface{}) + func (cm *ColumnMap) AddBoolColumn(key string, val bool) + func (cm *ColumnMap) AddBytesColumn(key string, val []byte) + func (cm *ColumnMap) AddFloat64Column(key string, val float64) + func (cm *ColumnMap) AddInt64Column(key string, val int64) + func (cm *ColumnMap) AddStringColumn(key string, val string) + func (cm *ColumnMap) GetInt64Column(key string) int64 + func (cm *ColumnMap) GetStringColumn(key string) string + func (cm *ColumnMap) ToMap() map[string]interface{} + type DefaultStore struct + func (s *DefaultStore) BatchStore(id string, cols *ColumnMap) *promise.Future + func (s *DefaultStore) Close() + func (s *DefaultStore) Delete(id string, seq int64) error + func (s *DefaultStore) Load(id string, seq int64) (*ColumnMap, error) + func (s *DefaultStore) Scan(id string, param *ScanParameter) (map[int64]*ColumnMap, int64, error) + func (s *DefaultStore) SequentialScan(id string, param *ScanParameter) ([]*SequentialMessage, int64, error) + func (s *DefaultStore) Store(id string, cols *ColumnMap) (int64, error) + func (s *DefaultStore) Sync() error + func (s *DefaultStore) Update(id string, seq int64, cols *ColumnMap) error + type Entry struct + Message Message + Sequence int64 + type Iterator struct + func NewIterator(retCh chan *Entry, errCh chan error) (*Iterator, context.Context) + func (i *Iterator) Close() + func (i *Iterator) Next() (*Entry, error) + type Message interface + type MessageAdapter interface + Marshal func(msg Message) (*ColumnMap, error) + Unmarshal func(cols *ColumnMap) (Message, error) + type MessageStore interface + BatchStore func(id string, cols *ColumnMap) *promise.Future + Close func() + Delete func(id string, seq int64) error + Load func(id string, seq int64) (*ColumnMap, error) + Scan func(id string, param *ScanParameter) (map[int64]*ColumnMap, int64, error) + SequentialScan func(id string, param *ScanParameter) ([]*SequentialMessage, int64, error) + Store func(id string, cols *ColumnMap) (int64, error) + Sync func() error + Update func(id string, seq int64, cols *ColumnMap) error + func NewDefaultStore(option StoreOption) (MessageStore, error) + func NewMessageStore(client tablestore.TableStoreApi, option StoreOption) (MessageStore, error) + type ScanParameter struct + BufChanSize int + ColToGet []string + ErrorChanSize int + Filter tablestore.ColumnFilter + From int64 + IsForward bool + MaxCount int + To int64 + type Schema struct + FirstPk string + SecondPk string + type SequentialMessage struct + Column *ColumnMap + Sequence int64 + type StoreOption struct + AkId string + AkSecret string + Endpoint string + Instance string + Schema *Schema + SecurityToken string + TTL int + TableName string + TableStoreConfig *tablestore.TableStoreConfig + Throughput *tablestore.ReservedThroughput + WriterConfig *writer.Config + type StreamMessage struct + Attr map[string]interface{} + Content interface{} + Id string + Timestamp int64 + type StreamMessageAdapter struct + AttrPrefix string + ContentKey string + IdKey string + TimestampKey string + func (s *StreamMessageAdapter) Marshal(msg Message) (*ColumnMap, error) + func (s *StreamMessageAdapter) Unmarshal(cols *ColumnMap) (Message, error) + type TmLine struct + func NewTmLine(id string, adapter MessageAdapter, store MessageStore) (*TmLine, error) + func (l *TmLine) BatchStore(message Message) (*promise.Future, error) + func (l *TmLine) Delete(sequenceId int64) error + func (l *TmLine) Load(sequenceId int64) (Message, error) + func (l *TmLine) Scan(param *ScanParameter) *Iterator + func (l *TmLine) Store(message Message) (int64, error) + func (l *TmLine) Update(sequenceId int64, message Message) error Other modules containing this package github.com/aliyun/aliyun-tablestore-go-sdk