Documentation ¶
Index ¶
- Constants
- func Run(ctx context.Context, l log.Logger, serviceAddress, backendURLString string, ...) error
- type HTTPServiceGoTSRPCClient
- func (tsc *HTTPServiceGoTSRPCClient) Remove(serviceIDs []github_com_foomo_webgrapple_vo.ServiceID) (err *github_com_foomo_webgrapple_vo.ServiceError, clientErr error)
- func (tsc *HTTPServiceGoTSRPCClient) Upsert(services []*github_com_foomo_webgrapple_vo.Service) (err *github_com_foomo_webgrapple_vo.ServiceError, clientErr error)
- type Middleware
- type Service
- type ServiceGoTSRPCClient
- type ServiceGoTSRPCProxy
- type ServiceMap
- type WebGrappleMiddleWareCreator
Constants ¶
View Source
const DefaultEndPoint = "/___webgrapple-service"
View Source
const DefaultServiceURL = "http://127.0.0.1:8888"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPServiceGoTSRPCClient ¶
func NewDefaultServiceGoTSRPCClient ¶
func NewDefaultServiceGoTSRPCClient(url string) *HTTPServiceGoTSRPCClient
func NewServiceGoTSRPCClient ¶
func NewServiceGoTSRPCClient(url string, endpoint string) *HTTPServiceGoTSRPCClient
func NewServiceGoTSRPCClientWithClient ¶
func NewServiceGoTSRPCClientWithClient(url string, endpoint string, client *net_http.Client) *HTTPServiceGoTSRPCClient
func (*HTTPServiceGoTSRPCClient) Remove ¶
func (tsc *HTTPServiceGoTSRPCClient) Remove(serviceIDs []github_com_foomo_webgrapple_vo.ServiceID) (err *github_com_foomo_webgrapple_vo.ServiceError, clientErr error)
func (*HTTPServiceGoTSRPCClient) Upsert ¶
func (tsc *HTTPServiceGoTSRPCClient) Upsert(services []*github_com_foomo_webgrapple_vo.Service) (err *github_com_foomo_webgrapple_vo.ServiceError, clientErr error)
type Middleware ¶
type Middleware func(next http.HandlerFunc) http.HandlerFunc
Middleware your way to handle requests
type ServiceGoTSRPCClient ¶
type ServiceGoTSRPCClient interface { Remove(serviceIDs []github_com_foomo_webgrapple_vo.ServiceID) (err *github_com_foomo_webgrapple_vo.ServiceError, clientErr error) Upsert(services []*github_com_foomo_webgrapple_vo.Service) (err *github_com_foomo_webgrapple_vo.ServiceError, clientErr error) }
type ServiceGoTSRPCProxy ¶
type ServiceGoTSRPCProxy struct { EndPoint string // contains filtered or unexported fields }
func NewDefaultServiceGoTSRPCProxy ¶
func NewDefaultServiceGoTSRPCProxy(service Service, allowOrigin []string) *ServiceGoTSRPCProxy
func NewServiceGoTSRPCProxy ¶
func NewServiceGoTSRPCProxy(service Service, endpoint string, allowOrigin []string) *ServiceGoTSRPCProxy
func (*ServiceGoTSRPCProxy) ServeHTTP ¶
func (p *ServiceGoTSRPCProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP exposes your service
type ServiceMap ¶
ServiceMap a map of registered services
type WebGrappleMiddleWareCreator ¶
type WebGrappleMiddleWareCreator func(services ServiceMap, fallbackServerURL *url.URL) (middleware Middleware, errCreation error)
WebGrappleMiddleWareCreator create a project specific middleware, when configs change
Click to show internal directories.
Click to hide internal directories.