Documentation ¶
Index ¶
- func HandleNon200(body io.ReadCloser) error
- type HTTPClient
- type HTTPService
- func (s *HTTPService) ResolveBoolean(flagKey string, context of.EvaluationContext, ...) (*schemaV1.ResolveBooleanResponse, error)
- func (s *HTTPService) ResolveNumber(flagKey string, context of.EvaluationContext, ...) (*schemaV1.ResolveNumberResponse, error)
- func (s *HTTPService) ResolveObject(flagKey string, context of.EvaluationContext, ...) (*schemaV1.ResolveObjectResponse, error)
- func (s *HTTPService) ResolveString(flagKey string, context of.EvaluationContext, ...) (*schemaV1.ResolveStringResponse, error)
- type HTTPServiceConfiguration
- type HTTPServiceOption
- type IHTTPClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleNon200 ¶
func HandleNon200(body io.ReadCloser) error
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func (*HTTPClient) FetchFlag ¶
func (c *HTTPClient) FetchFlag(url string, ctx of.EvaluationContext, p interface{}) (io.ReadCloser, int, error)
func (*HTTPClient) GetInstance ¶
func (c *HTTPClient) GetInstance() http.Client
type HTTPService ¶
type HTTPService struct { HTTPServiceConfiguration *HTTPServiceConfiguration Client IHTTPClient }
func NewHTTPService ¶
func NewHTTPService(opts ...HTTPServiceOption) *HTTPService
func (*HTTPService) ResolveBoolean ¶
func (s *HTTPService) ResolveBoolean(flagKey string, context of.EvaluationContext, options ...service.IServiceOption) (*schemaV1.ResolveBooleanResponse, error)
func (*HTTPService) ResolveNumber ¶
func (s *HTTPService) ResolveNumber(flagKey string, context of.EvaluationContext, options ...service.IServiceOption) (*schemaV1.ResolveNumberResponse, error)
func (*HTTPService) ResolveObject ¶
func (s *HTTPService) ResolveObject(flagKey string, context of.EvaluationContext, options ...service.IServiceOption) (*schemaV1.ResolveObjectResponse, error)
func (*HTTPService) ResolveString ¶
func (s *HTTPService) ResolveString(flagKey string, context of.EvaluationContext, options ...service.IServiceOption) (*schemaV1.ResolveStringResponse, error)
type HTTPServiceOption ¶
type HTTPServiceOption func(*HTTPService)
func WithHost ¶
func WithHost(host string) HTTPServiceOption
func WithPort ¶
func WithPort(port int32) HTTPServiceOption
type IHTTPClient ¶
type IHTTPClient interface {
FetchFlag(url string, ctx of.EvaluationContext, p interface{}) (io.ReadCloser, int, error)
}
Click to show internal directories.
Click to hide internal directories.