sender

package
v0.0.0-...-39992ae Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventsClient

type EventsClient struct {
	Auth      *EventsClientItem
	Analytics *EventsClientItem
	Pictures  *EventsClientItem
	Users     *EventsClientItem
	Results   *EventsClientItem
}

type EventsClientItem

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

type EventsRequestInput

type EventsRequestInput struct {
	Service string
	Event   string
	Data    string
}

type GrpcClient

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

type Headers

type Headers map[string]string

type RequestMeta

type RequestMeta map[string]interface{}

type RestApiBaseUrls

type RestApiBaseUrls map[string]string

type RestClient

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

type RpcClient

type RpcClient int
const (
	UsersRpcClient RpcClient = iota
	PicturesRpcClient
	AnalyticsRpcClient
	AuthRpcClient
)

type RpcRequestInput

type RpcRequestInput struct {
	Client RpcClient
	Method string
	Data   []byte
}

type Sender

type Sender interface {
	Connect(c *config.Config, cancel context.CancelFunc)
	PerformRequest(transport Transport, service string, method string, input interface{}, el eventslistener.EventListener, span *opentracing.Span, meta RequestMeta, res interface{}) error
	SendEventsResponse(eventUuid string, value interface{}, span *opentracing.Span) error
	GetTransportFromContext(ctx context.Context) Transport
	StringToTransport(transport string) (Transport, error)
	TransportToString(transport Transport) (string, error)
	GetAPI() config.ApiConfig
	CheckStruct(val interface{}) bool
}

func NewSender

func NewSender(ac config.ApiConfig, l *zap.Logger) Sender

type Transport

type Transport int
const (
	RestTransport Transport = iota
	RpcTransport
	EventsTransport
)

type UrlParams

type UrlParams map[string]string

Jump to

Keyboard shortcuts

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