Documentation
¶
Overview ¶
Package sample provides a deterministic gRPC service for ingress experiments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶ added in v0.3.0
type Server struct {
// contains filtered or unexported fields
}
Server serves sample gRPC requests and HTTP health checks on one listener.
func NewServer ¶ added in v0.3.0
NewServer constructs a sample server around a configured gRPC server.
type Service ¶
type Service struct {
samplepb.UnimplementedUserServiceServer
// contains filtered or unexported fields
}
Service serves a read-only snapshot loaded from ProtoJSON.
func (*Service) GetUser ¶
func (s *Service) GetUser(ctx context.Context, request *samplepb.GetUserRequest) (*samplepb.GetUserResponse, error)
GetUser returns one sample user, or InvalidArgument or NotFound for an invalid ID.
func (*Service) ListUsers ¶
func (s *Service) ListUsers(ctx context.Context, request *samplepb.ListUsersRequest) (*samplepb.ListUsersResponse, error)
ListUsers filters by IDs and optional role, preserving fixture order and its fixed timestamp.
Click to show internal directories.
Click to hide internal directories.