eventdispatch

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDispatch = coderr.NewCodeError(coderr.Internal, "event dispatch failed")

Functions

This section is empty.

Types

type CloseShardRequest

type CloseShardRequest struct {
	ShardID uint32
}

type CloseTableOnShardRequest added in v1.0.0

type CloseTableOnShardRequest struct {
	UpdateShardInfo UpdateShardInfo
	TableInfo       metadata.TableInfo
}

type CreateTableOnShardRequest

type CreateTableOnShardRequest struct {
	UpdateShardInfo  UpdateShardInfo
	TableInfo        metadata.TableInfo
	EncodedSchema    []byte
	Engine           string
	CreateIfNotExist bool
	Options          map[string]string
}

type Dispatch

type Dispatch interface {
	OpenShard(context context.Context, address string, request OpenShardRequest) error
	CloseShard(context context.Context, address string, request CloseShardRequest) error
	CreateTableOnShard(context context.Context, address string, request CreateTableOnShardRequest) error
	DropTableOnShard(context context.Context, address string, request DropTableOnShardRequest) error
	OpenTableOnShard(ctx context.Context, address string, request OpenTableOnShardRequest) error
	CloseTableOnShard(context context.Context, address string, request CloseTableOnShardRequest) error
}

type DispatchImpl

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

func NewDispatchImpl

func NewDispatchImpl() *DispatchImpl

func (*DispatchImpl) CloseShard

func (d *DispatchImpl) CloseShard(ctx context.Context, addr string, request CloseShardRequest) error

func (*DispatchImpl) CloseTableOnShard added in v1.0.0

func (d *DispatchImpl) CloseTableOnShard(ctx context.Context, addr string, request CloseTableOnShardRequest) error

func (*DispatchImpl) CreateTableOnShard

func (d *DispatchImpl) CreateTableOnShard(ctx context.Context, addr string, request CreateTableOnShardRequest) error

func (*DispatchImpl) DropTableOnShard

func (d *DispatchImpl) DropTableOnShard(ctx context.Context, addr string, request DropTableOnShardRequest) error

func (*DispatchImpl) OpenShard

func (d *DispatchImpl) OpenShard(ctx context.Context, addr string, request OpenShardRequest) error

func (*DispatchImpl) OpenTableOnShard added in v1.0.0

func (d *DispatchImpl) OpenTableOnShard(ctx context.Context, addr string, request OpenTableOnShardRequest) error

type DropTableOnShardRequest

type DropTableOnShardRequest struct {
	UpdateShardInfo UpdateShardInfo
	TableInfo       metadata.TableInfo
}

type OpenShardRequest

type OpenShardRequest struct {
	Shard metadata.ShardInfo
}

type OpenTableOnShardRequest added in v1.0.0

type OpenTableOnShardRequest struct {
	UpdateShardInfo UpdateShardInfo
	TableInfo       metadata.TableInfo
}

type UpdateShardInfo

type UpdateShardInfo struct {
	CurrShardInfo metadata.ShardInfo
	PrevVersion   uint64
}

Jump to

Keyboard shortcuts

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