Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RestClient ¶
type RestClient interface { SetProvider(provider registry.IServiceProvider) SetClient(client *resty.Client) SetRootPath(rootPath string) }
RestClient defines service client interface
type RestClientOption ¶
type RestClientOption func(RestClient)
RestClientOption defines configure function type
func WithClient ¶
func WithClient(client *resty.Client) RestClientOption
WithClient sets http client
func WithProvider ¶
func WithProvider(provider registry.IServiceProvider) RestClientOption
WithProvider sets service provider
func WithRootPath ¶
func WithRootPath(rootPath string) RestClientOption
WithRootPath sets root path for sending http requests
type ServiceProvider ¶
type ServiceProvider struct {
// contains filtered or unexported fields
}
ServiceProvider defines an implementation for IServiceProvider
func NewServiceProvider ¶
func NewServiceProvider(env string) *ServiceProvider
NewServiceProvider creates new ServiceProvider instance
func (*ServiceProvider) Close ¶ added in v2.0.6
func (s *ServiceProvider) Close()
func (*ServiceProvider) SelectServer ¶
func (s *ServiceProvider) SelectServer() string
SelectServer return service address from environment variable
Click to show internal directories.
Click to hide internal directories.