Documentation
¶
Index ¶
- Constants
- Variables
- func DWIMURI(ctx *core.Context, uri string) string
- func GetHTTPRequest(ctx *core.Context, r *http.Request) (map[string]interface{}, error)
- func GetStringParam(m map[string]interface{}, p string, required bool) (string, bool, error)
- func MaybeYAML(bs []byte) bool
- func StringMaps(x interface{}) interface{}
- func Unmarshal(bs []byte, v interface{}) error
- func UnmarshalYAML(bs []byte, v interface{}) error
- type ConnStates
- type HTTPService
- func (s *HTTPService) MaxPending() int32
- func (s *HTTPService) Maxed() (bool, int32)
- func (s *HTTPService) Pending() int32
- func (s *HTTPService) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *HTTPService) SetMaxPending(max int32)
- func (s *HTTPService) Start(ctx *core.Context, servicePort string) error
- type Listener
- type Redirect
- type Service
- func (s *Service) HealthDeep(ctx *core.Context) error
- func (s *Service) HealthDeeper(ctx *core.Context) error
- func (s *Service) ProcessRequest(ctx *core.Context, m map[string]interface{}, out io.Writer) (map[string]interface{}, error)
- func (s *Service) Shutdown(ctx *core.Context) error
- func (s *Service) Start(ctx *core.Context, enginePort string) error
- type TooManyConnectionsError
Constants ¶
View Source
const APIVersion = "0.0.9"
Variables ¶
View Source
var BeGraceful = true // Parameter
View Source
var TooManyConnections = &TooManyConnectionsError{}
View Source
var UnknownSyntax = errors.New("unknown syntax")
Functions ¶
func GetHTTPRequest ¶
func GetStringParam ¶
func StringMaps ¶
func StringMaps(x interface{}) interface{}
StringMaps tries to makes (recursively) a map[string]interface{} from a map[interface{}]interface{} (which yaml.Unmarshal tends to provide). When something goes wrong, the original value is returned.
func UnmarshalYAML ¶
Types ¶
type ConnStates ¶
func NewConnStates ¶
func NewConnStates() *ConnStates
func (*ConnStates) Get ¶
func (cs *ConnStates) Get() map[string]int64
func (*ConnStates) Inc ¶
func (cs *ConnStates) Inc(state string)
type HTTPService ¶
type HTTPService struct { Ctx *core.Context Service *Service // contains filtered or unexported fields }
func NewHTTPService ¶
func NewHTTPService(ctx *core.Context, service *Service) (*HTTPService, error)
func (*HTTPService) MaxPending ¶
func (s *HTTPService) MaxPending() int32
func (*HTTPService) Maxed ¶
func (s *HTTPService) Maxed() (bool, int32)
func (*HTTPService) Pending ¶
func (s *HTTPService) Pending() int32
func (*HTTPService) ServeHTTP ¶
func (s *HTTPService) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*HTTPService) SetMaxPending ¶
func (s *HTTPService) SetMaxPending(max int32)
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
type Redirect ¶
type Redirect struct {
To string
}
Redirect packaged up directive to send a client to another process.
Not currently used. Will be used when we have a Router.
type Service ¶
type Service struct { System *System // Router is a placeholder for a router, a component which can // determine what process hosts a given location. We'll // introduce some router implementations in the future. Router interface{} // Stopper is function we call when we want to shut ourselves down. // // Typically this function is defined by the HTTP server to // provide a hook to shut down that server. Stopper func(*core.Context, time.Duration) error }
func (*Service) ProcessRequest ¶
type TooManyConnectionsError ¶
type TooManyConnectionsError struct { }
func (*TooManyConnectionsError) Error ¶
func (e *TooManyConnectionsError) Error() string
func (*TooManyConnectionsError) Temporary ¶
func (e *TooManyConnectionsError) Temporary() bool
func (*TooManyConnectionsError) Timeout ¶
func (e *TooManyConnectionsError) Timeout() bool
Click to show internal directories.
Click to hide internal directories.