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"` }
Click to show internal directories.
Click to hide internal directories.