Documentation
¶
Overview ¶
Package restapi Pub/Sub Rest API.
Rest API spec .
Terms Of Service:
Schemes: http, https Host: localhost:8089 basePath: /api/ocloudNotifications/v1 Version: 1.0.0 Contact: Aneesh Puttur<aputtur@redhat.com> Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
- Constants
- type Server
- func (s *Server) EndPointHealthChk() (err error)
- func (s *Server) GetHostPath() *types.URI
- func (s *Server) GetSubscriberAPI() *subscriberApi.API
- func (s *Server) Port() int
- func (s *Server) Ready() bool
- func (s *Server) SetOnStatusReceiveOverrideFn(fn func(e cloudevents.Event, dataChan *channel.DataChan) error)
- func (s *Server) Shutdown()
- func (s *Server) Start()
Constants ¶
View Source
const ( API_VERSION = "2.0" HTTPReadHeaderTimeout = 2 * time.Second )
View Source
const (
CURRENTSTATE = "CurrentState"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server defines rest routes server object
var ServerInstance *Server
ServerInstance ... is singleton instance
func InitServer ¶
func InitServer(port int, apiHost, apiPath, storePath string, dataOut chan<- *channel.DataChan, closeCh <-chan struct{}, onStatusReceiveOverrideFn func(e cloudevents.Event, dataChan *channel.DataChan) error) *Server
InitServer is used to supply configurations for rest routes server
func (*Server) EndPointHealthChk ¶
EndPointHealthChk checks for rest service health
func (*Server) GetSubscriberAPI ¶
func (s *Server) GetSubscriberAPI() *subscriberApi.API
GetSubscriberAPI ...
func (*Server) SetOnStatusReceiveOverrideFn ¶
func (s *Server) SetOnStatusReceiveOverrideFn(fn func(e cloudevents.Event, dataChan *channel.DataChan) error)
SetOnStatusReceiveOverrideFn ... sets receiver function
Click to show internal directories.
Click to hide internal directories.