contract

package
v0.0.0-...-bd0de05 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IModuleEventReq

type IModuleEventReq interface {
	SetEventType(eventType string)
	GetEventType() string
	SetMsg(msg interface{})
	GetMsg() interface{}
	SetResultChan(result chan IModuleEventResult)
	GetResultChan() chan IModuleEventResult
	SetMustReturn(bSet bool)
	GetMustReturn() bool
	WriteResultData(resData interface{})
	UnmarshalToDaprEventData(v interface{}) error
	UnmarshalToDaprCallData(v interface{}) error
}

type IModuleEventResult

type IModuleEventResult interface {
	GetError() error
	SetError(err error)
	GetResult() []byte
	SetResult([]byte)
}

type IModuleInterface

type IModuleInterface interface {
	Name() string
	OnInit() error
	OnStart() error
	OnTick(utc time.Time)
	OnStop() error
	OnExit() error
	Secondly(utc time.Time)
	Minutely(utc time.Time)
	Hourly(utc time.Time)
	Daily(utc time.Time)
}

type IServiceHandler

type IServiceHandler interface {
	GetGameServiceDaprCallTypes() []string
	GetGameServiceDaprEventTypes() []string
	GetWeb3DaprCallTypes() []string
	GetWeb3DaprEventTypes() []string
	RegisterClientEvent()
	RegisterGameServiceDaprCall()
	RegisterGameServiceDaprEvent()
	RegisterWeb3DaprCall()
	RegisterWeb3DaprEvent()

	EventCall(env IModuleEventReq) IModuleEventResult
	EventCallNoReturn(env IModuleEventReq)

	OnEvent(env IModuleEventReq)
}

type IServiceHeartInterface

type IServiceHeartInterface interface {
	IModuleInterface
	SendHeart(curMs int64) error
}

type ServiceEventFunc

type ServiceEventFunc func(env IModuleEventReq)

Jump to

Keyboard shortcuts

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