cluster

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MachineId

func MachineId() string

func NewRequest added in v0.3.1

func NewRequest() *request

func UnmarshalJsonBody

func UnmarshalJsonBody(re *http.Request, v any) error

Types

type HttpClient added in v0.3.1

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

func NewHttpClient added in v0.3.1

func NewHttpClient() *HttpClient

func (*HttpClient) Call added in v0.3.1

func (client *HttpClient) Call(machine *Machine, path string, jsonData []byte) (data []byte, err error)
func (client *HttpClient) CallByLink(link string, path string, jsonData []byte) (data []byte, err error)

type Machine

type Machine struct {
	Link      string
	MachineId string
}

type MachineStore added in v0.3.1

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

func NewMachineStore added in v0.3.1

func NewMachineStore(context *core.Context) *MachineStore
func (machineStore *MachineStore) GetMachineLink(machineId string) string

func (*MachineStore) GetMachineNum added in v0.3.1

func (machineStore *MachineStore) GetMachineNum() int

func (*MachineStore) GetMachines added in v0.3.1

func (machineStore *MachineStore) GetMachines() []*Machine

func (*MachineStore) GetTempMachines added in v0.3.1

func (machineStore *MachineStore) GetTempMachines() []*Machine

func (*MachineStore) Query added in v0.3.1

func (machineStore *MachineStore) Query(parameter *core.Parameter, localValue any) []any

type Machines added in v0.3.1

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

func NewMachines added in v0.3.1

func NewMachines() *Machines

type Response

type Response struct {
	Code int
	Msg  string
}

type Server

type Server struct {
	core.IForward
	core.IHttpServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Init

func (server *Server) Init(context *core.Context)

func (*Server) Name

func (server *Server) Name() string

func (*Server) Query

func (server *Server) Query(parameter *core.Parameter, localValue any) []any

func (*Server) Start

func (server *Server) Start() error

func (*Server) WriteSyncMessage added in v0.1.35

func (server *Server) WriteSyncMessage(iMessage message.IMessage) (fa bool, err error)

Jump to

Keyboard shortcuts

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