Documentation ¶
Index ¶
- type HealthChecker
- type ToDoServiceServer
- func (s *ToDoServiceServer) Close()
- func (s *ToDoServiceServer) Create(ctx context.Context, r *pb.CreateRequest) (*pb.CreateResponse, error)
- func (s *ToDoServiceServer) Delete(ctx context.Context, r *pb.DeleteRequest) (*pb.DeleteResponse, error)
- func (s *ToDoServiceServer) HealthChecher() func() error
- func (s *ToDoServiceServer) Read(ctx context.Context, r *pb.ReadRequest) (*pb.ReadResponse, error)
- func (s *ToDoServiceServer) Search(ctx context.Context, r *pb.SearchRequest) (*pb.SearchResponse, error)
- func (s *ToDoServiceServer) Update(ctx context.Context, r *pb.UpdateRequest) (*pb.UpdateResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthChecker ¶
type HealthChecker struct {
HealthCheck func() error
}
HealthChecker the health checker
func (*HealthChecker) Check ¶
func (h *HealthChecker) Check(ctx context.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
Check implements the health check interface, which directly returns to health status. There are also more complex health check strategies, such as returning based on server load.
func (*HealthChecker) Watch ¶
func (h *HealthChecker) Watch(req *grpc_health_v1.HealthCheckRequest, w grpc_health_v1.Health_WatchServer) error
Watch not yet implemented
type ToDoServiceServer ¶
type ToDoServiceServer struct {
// contains filtered or unexported fields
}
ToDoServiceServer manages the todos list
func NewToDoServiceServer ¶
func NewToDoServiceServer(ctx context.Context, url string) (*ToDoServiceServer, error)
NewToDoServiceServer TODO
func (*ToDoServiceServer) Create ¶
func (s *ToDoServiceServer) Create(ctx context.Context, r *pb.CreateRequest) (*pb.CreateResponse, error)
Create a todo
func (*ToDoServiceServer) Delete ¶
func (s *ToDoServiceServer) Delete(ctx context.Context, r *pb.DeleteRequest) (*pb.DeleteResponse, error)
Delete a todo
func (*ToDoServiceServer) HealthChecher ¶
func (s *ToDoServiceServer) HealthChecher() func() error
HealthChecher the checker
func (*ToDoServiceServer) Read ¶
func (s *ToDoServiceServer) Read(ctx context.Context, r *pb.ReadRequest) (*pb.ReadResponse, error)
Read a todo
func (*ToDoServiceServer) Search ¶
func (s *ToDoServiceServer) Search(ctx context.Context, r *pb.SearchRequest) (*pb.SearchResponse, error)
Search todos
func (*ToDoServiceServer) Update ¶
func (s *ToDoServiceServer) Update(ctx context.Context, r *pb.UpdateRequest) (*pb.UpdateResponse, error)
Update a todo
Click to show internal directories.
Click to hide internal directories.