myserviceproxy

package
v0.0.0-...-f698312 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory

type ClientFactory func(context.Context) (client myservice.MyService, close func(), err error)

type ClientPool

type ClientPool struct {
	// contains filtered or unexported fields
}

func NewClientPool

func NewClientPool(clientFactory ClientFactory, idleCapacity int, maxResources int) *ClientPool

func (*ClientPool) Close

func (p *ClientPool) Close()

func (*ClientPool) GetClient

func (p *ClientPool) GetClient(ctx context.Context) (client myservice.MyService, release func(), err error)

func (*ClientPool) GetPool

func (p *ClientPool) GetPool() *resourcepool.ResourcePool

func (*ClientPool) SetRetries

func (p *ClientPool) SetRetries(retries int)

type ErrCreateResource

type ErrCreateResource struct {
	Err error
}

func NewErrCreateResource

func NewErrCreateResource(err error) *ErrCreateResource

func (*ErrCreateResource) Error

func (e *ErrCreateResource) Error() string

func (*ErrCreateResource) Unwrap

func (e *ErrCreateResource) Unwrap() error

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

func New

func New(clientFactory ClientFactory) *Proxy

func (*Proxy) GetResponse

func (p *Proxy) GetResponse(ctx context.Context, id myservice.UUID, req *myservice.MyRequest) (r *myservice.MyResponse, err error)

func (*Proxy) Ping

func (p *Proxy) Ping(ctx context.Context) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL