entry

package
v0.0.0-...-5fea7ce Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrorCodeUnknown        = 9999
	ErrorCodeEntityNotFound = 6001
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityClient

type EntityClient struct {
	Name                     string
	Version                  int64
	Instance                 string
	Export                   interface{}
	Client                   *rpc.YouPlusRPCClient
	HeartbeatRate            int64
	StopHeartbeatContext     context.Context
	StopHeartbeatContextFunc context.CancelFunc
}

func NewEntityClient

func NewEntityClient(name string, version int64, export interface{}, client *rpc.YouPlusRPCClient) *EntityClient

func (*EntityClient) Register

func (e *EntityClient) Register() error

func (*EntityClient) StartHeartbeat

func (e *EntityClient) StartHeartbeat(ctx context.Context) error

func (*EntityClient) Unregister

func (e *EntityClient) Unregister() error

func (*EntityClient) UpdateExport

func (e *EntityClient) UpdateExport(data interface{}) error

type EntityExport

type EntityExport struct {
	Urls  []string    `json:"urls"`
	Extra interface{} `json:"extra"`
}

Jump to

Keyboard shortcuts

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