Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
Request allows for making REST-like requests to a RestServer using single-use messages Can be used as stateful or declared inline without state
func (*Request) AsyncRequest ¶
func (s *Request) AsyncRequest(recipient contact.Contact, method restlike.Method, path restlike.URI, content restlike.Data, headers *restlike.Headers, cb restlike.RequestCallback, singleParams single.RequestParams) error
AsyncRequest provides several Method of sending Data to the given URI and will return the Message to the given Callback when received
func (*Request) Request ¶
func (s *Request) Request(recipient contact.Contact, method restlike.Method, path restlike.URI, content restlike.Data, headers *restlike.Headers, singleParams single.RequestParams) (*restlike.Message, error)
Request provides several Method of sending Data to the given URI and blocks until the Message is returned
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the RestServer interface using single-use
func NewServer ¶
func NewServer(receptionId *id.ID, privKey *cyclic.Int, grp *cyclic.Group, net single.ListenCmix) *Server
NewServer builds a RestServer with single-use and the provided arguments, then registers necessary external services
func (*Server) Close ¶
func (r *Server) Close()
Close the internal RestServer endpoints and external services
func (*Server) GetEndpoints ¶
GetEndpoints returns the association of a Callback with a specific URI and a variety of different REST Method