client

package
v0.0.0-...-8b0bb58 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransportTypeGRPCStr = "gRPC"
	TransportTypeHTTPStr = "HTTP"
)

Variables

View Source
var ServiceSetForClient = wire.NewSet(NewLogisticsClient)

ServiceSetForClient providers

Functions

This section is empty.

Types

type APILogisticsClient

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

APILogisticsClient to send requests about cargo unit movements

func NewLogisticsClient

func NewLogisticsClient(cfg *config.ClientAppConfig) *APILogisticsClient

NewLogisticsClient instance

func (*APILogisticsClient) Connect

func (lc *APILogisticsClient) Connect(serverAddr string, ctx context.Context) error

Connect to gRPC API

func (*APILogisticsClient) Disconnect

func (lc *APILogisticsClient) Disconnect() error

Disconnect from gRPC API

func (*APILogisticsClient) MoveUnit

func (lc *APILogisticsClient) MoveUnit(ctx context.Context, req *apiv1.MoveUnitRequest) (responseErr error)

MoveUnit to new location

func (*APILogisticsClient) UnitReachedWarehouse

func (lc *APILogisticsClient) UnitReachedWarehouse(ctx context.Context, req *apiv1.UnitReachedWarehouseRequest) (responseErr error)

UnitReachedWarehouse report that reach warehouse

type TransportType

type TransportType byte

TransportType represents how messages must be sent.

const (
	// TransportTypeGRPC default mode how client will send messages to server.
	TransportTypeGRPC TransportType = iota
	// TransportTypeHTTP generic HTTP requests.
	TransportTypeHTTP
)

func (*TransportType) Is

func (tt *TransportType) Is(needed TransportType) bool

Is TransportType matching needed one.

Jump to

Keyboard shortcuts

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