assign

package
v0.0.0-...-8588863 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assign

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

Assign watch /segment/{table}/alloc/{addr} and /segment/{table}/section/{tag}/{hashId}. assign 'pending' section to a certain alloc and put routing rule(with 'pending' value). delete --prefix routing key in case alloc crashed. watch routing rule to manage idle section to re-assign.

func NewAssign

func NewAssign(ctx context.Context, conf *utils.Config) (*Assign, error)

func (*Assign) Close

func (a *Assign) Close(ctx context.Context) error

func (*Assign) ReBalance

func (a *Assign) ReBalance(ctx context.Context) error

func (*Assign) RegSection

func (a *Assign) RegSection(ctx context.Context, tag string, async bool) error

func (*Assign) UnRegSection

func (a *Assign) UnRegSection(ctx context.Context, tag string, async bool) error

type Server

type Server struct {
	*pb.UnimplementedAssignServer
	// contains filtered or unexported fields
}

func NewAssignServer

func NewAssignServer(ctx context.Context, conf *utils.Config) (*Server, error)

func (*Server) Close

func (a *Server) Close(ctx context.Context) error

func (*Server) ReBalance

func (a *Server) ReBalance(ctx context.Context, in *pb.ReBalanceReq) (*pb.ReBalanceResp, error)

func (*Server) RegSection

func (a *Server) RegSection(ctx context.Context, in *pb.RegSectionReq) (*pb.RegSectionResp, error)

func (*Server) UnRegSection

func (a *Server) UnRegSection(ctx context.Context, in *pb.UnRegSectionReq) (*pb.UnRegSectionResp, error)

Jump to

Keyboard shortcuts

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