eventdispatch

package
v1.0.0-alpha02 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 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 CreateTableOnShardRequest

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

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
}

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) 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

type DropTableOnShardRequest

type DropTableOnShardRequest struct {
	UpdateShardInfo UpdateShardInfo
	TableInfo       cluster.TableInfo
}

type OpenShardRequest

type OpenShardRequest struct {
	Shard cluster.ShardInfo
}

type UpdateShardInfo

type UpdateShardInfo struct {
	CurrShardInfo cluster.ShardInfo
	PrevVersion   uint64
}

Jump to

Keyboard shortcuts

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