Documentation ¶
Index ¶
- Constants
- Variables
- type APILogisticsClient
- func (lc *APILogisticsClient) Connect(serverAddr string, ctx context.Context) error
- func (lc *APILogisticsClient) Disconnect() error
- func (lc *APILogisticsClient) MoveUnit(ctx context.Context, req *apiv1.MoveUnitRequest) (responseErr error)
- func (lc *APILogisticsClient) UnitReachedWarehouse(ctx context.Context, req *apiv1.UnitReachedWarehouseRequest) (responseErr error)
- type TransportType
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.
Click to show internal directories.
Click to hide internal directories.