base

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterInfo

func GetClusterInfo() *raft.ClusterState

func IsSelf

func IsSelf() bool

func RouteInner

func RouteInner(app *iris.Application)

RouteInner 暂时不能加权限, 只能校验请求是否为集群内部IP而来

func RouteRaft

func RouteRaft(party iris.Party)

func RouteStore

func RouteStore(party iris.Party)

Types

type KeyCmd

type KeyCmd struct {
	Cmd   string `json:"cmd,omitempty"`
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
	Exp   int64  `json:"exp,omitempty"`
}

type RaftCmd

type RaftCmd struct {
	Cmd    string `json:"cmd,omitempty"`
	NodeId string `json:"nodeId,omitempty"`
	Addr   string `json:"addr,omitempty"`
}

Jump to

Keyboard shortcuts

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