Documentation
¶
Index ¶
- Variables
- func Load()
- type ApiDescription
- type ApiInterface
- type BasicInformation
- type BlankService
- func (b BlankService) Cancel(req interface{}) (err error)
- func (b BlankService) Execute(req interface{}) (result []byte, err error)
- func (b BlankService) Information() (info BasicInformation)
- func (b BlankService) Name() (name string)
- func (b BlankService) PreExecute(req interface{}) (result []byte, err error)
- func (b BlankService) PushClientRequest(req interface{}) (result string, err error)
- func (b BlankService) RequestsForConsensus(lastReqs []interface{}) (req [][]byte, cnt uint32)
- type IService
- type Parameters
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiParameterType = struct { XML enum.Element JSON enum.Element URL enum.Element Binary enum.Element Private enum.Element }{}
Functions ¶
Types ¶
type ApiDescription ¶
type ApiDescription struct { Protocol string Address string ApiList []ApiInterface }
type ApiInterface ¶
type ApiInterface struct { Description string Path string Method string Parameters Parameters }
type BasicInformation ¶
type BasicInformation struct { Name string Description string Settings interface{} Api ApiDescription SubServices []BasicInformation }
type BlankService ¶
type BlankService struct{}
a blank service to simplify the creation of new services
func (BlankService) Cancel ¶
func (b BlankService) Cancel(req interface{}) (err error)
func (BlankService) Execute ¶
func (b BlankService) Execute(req interface{}) (result []byte, err error)
func (BlankService) Information ¶
func (b BlankService) Information() (info BasicInformation)
func (BlankService) Name ¶
func (b BlankService) Name() (name string)
func (BlankService) PreExecute ¶
func (b BlankService) PreExecute(req interface{}) (result []byte, err error)
func (BlankService) PushClientRequest ¶
func (b BlankService) PushClientRequest(req interface{}) (result string, err error)
func (BlankService) RequestsForConsensus ¶
func (b BlankService) RequestsForConsensus(lastReqs []interface{}) (req [][]byte, cnt uint32)
type IService ¶
type IService interface { //service name, this is the ID that registered to engine Name() (name string) //build request list for consensus network, engine will call this method when you are a consensus leader RequestsForConsensus(lastReqs []interface{}) (req [][]byte, cnt uint32) //receive and verify request from consensus network (on the other word, this request comes from consensus leader) PreExecute(req interface{}) (result []byte, err error) //receive and execute confirmed request of this round of consensus Execute(req interface{}) (result []byte, err error) //handle consensus failed Cancel(req interface{}) (err error) //service information Information() (info BasicInformation) }
type Parameters ¶
type Parameters http.Parameters
Click to show internal directories.
Click to hide internal directories.