app

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 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 GRPCServer

type GRPCServer struct {
	way.UnimplementedStateServiceServer
	// contains filtered or unexported fields
}

GRPCServer is a gRPC server implementation that provides the StateService RPC service. It implements the way.StateServiceServer interface.

func NewGRPCServer

func NewGRPCServer(
	checker *usecases.Checker,
) *GRPCServer

NewGRPCServer creates a new instance of the GRPCServer struct.

It takes a *usecases.Checker as a parameter and returns a pointer to a GRPCServer struct. The GRPCServer struct implements the way.StateServiceServer interface and is used to provide the StateService RPC service. The checker parameter is used to send events to the checker.

Parameters:

  • checker: A *usecases.Checker used to send events to the checker.

Returns:

  • A pointer to a GRPCServer struct.

func (*GRPCServer) Update

func (s *GRPCServer) Update(stream way.StateService_UpdateServer) error

Update handles the Update RPC call.

It receives a stream of UpdateRequest messages from the client and responds with an UpdateResponse message for each request. It continues to receive requests until the client closes the stream.

Each UpdateRequest message contains a list of UUIDs that need to be updated. These UUIDs are used to uniquely identify the request and can be used to track the request throughout the system.

For each UpdateRequest message, the server sends an empty UpdateResponse message to indicate that the update operation was successful.

If there is a problem with receiving or sending messages, an error is returned.

Jump to

Keyboard shortcuts

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