app

package
v0.0.0-...-e92273e Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func NewApp

func NewApp() *App

func (*App) DeleteKey

func (a *App) DeleteKey(ctx context.Context, key string) error

func (*App) MatchTopic

func (a *App) MatchTopic(ctx context.Context, req *api.MatchTopicRequest) (*api.MatchTopicResponse, error)

func (*App) PutKey

func (a *App) PutKey(ctx context.Context, key, value string) error

func (*App) ReadKey

func (a *App) ReadKey(ctx context.Context, key string) (value string, exists bool, err error)

func (*App) ReadPrefixKey

func (a *App) ReadPrefixKey(ctx context.Context, prefix string) (value map[string]string, err error)

func (*App) StartTopicCluster

func (a *App) StartTopicCluster(ctx context.Context, option ...Option) error

func (*App) Subscribe

func (a *App) Subscribe(ctx context.Context, request *proto.SubRequest) (rsp *proto.SubResponse, err error)

func (*App) UnSubscribe

func (a *App) UnSubscribe(ctx context.Context, request *proto.UnSubRequest) (rsp *proto.UnSubResponse, err error)

type Cluster

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

func NewCluster

func NewCluster(options ...Option) *Cluster

func (*Cluster) Close

func (c *Cluster) Close() error

func (*Cluster) Read

func (c *Cluster) Read(ctx context.Context, query interface{}) (interface{}, error)

func (*Cluster) Start

func (c *Cluster) Start(ctx context.Context) error

func (*Cluster) Write

func (c *Cluster) Write(ctx context.Context, data []byte) (statemachine.Result, error)

type Option

type Option func(*Cluster)

func WithConfig

func WithConfig(cfg config.Config) Option

func WithInitMember

func WithInitMember(mem map[uint64]dragonboat.Target) Option

func WithJoin

func WithJoin(join bool) Option

func WithNodeConfig

func WithNodeConfig(nodeConfig config.NodeHostConfig) Option

func WithStateMachine

func WithStateMachine(state statemachine.IStateMachine) Option

Jump to

Keyboard shortcuts

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