Documentation
¶
Index ¶
- type Service
- func (s *Service) CloseInternalClientConn() error
- func (s *Service) Create(ctx context.Context, sample *apipb.Sample) (*apipb.SampleCreateResponse, error)
- func (s *Service) Delete(ctx context.Context, req *apipb.SampleDeleteRequest) (*empty.Empty, error)
- func (s *Service) GRPCServer() *grpc.Server
- func (s *Service) Get(ctx context.Context, req *apipb.SampleGetRequest) (*apipb.Sample, error)
- func (s *Service) List(ctx context.Context, req *empty.Empty) (*apipb.SampleListResponse, error)
- func (s *Service) RESTMux(ctx context.Context) (*runtime.ServeMux, error)
- func (s *Service) RESTMuxViaGRPC(ctx context.Context, listenAddr string) (*runtime.ServeMux, error)
- func (s *Service) Update(ctx context.Context, req *apipb.Sample) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the API implementation
func (*Service) CloseInternalClientConn ¶
CloseInternalClientConn closes the internal client connection if we use the RESTMuxViaGRPC() style calls. While this isn't strictly necessary, being able to shut it down will clean things up so unit tests don't complain about leaked goroutines.
func (*Service) GRPCServer ¶
Return a gRPC server instance.
func (*Service) RESTMux ¶
RESTMux that uses the service directly. This means requests will not go through interceptors.
func (*Service) RESTMuxViaGRPC ¶
RESTMuxViaGRPC creates a mux which uses an internal gRPC client. This has the benefit that REST accesses will go through interceptors.
Click to show internal directories.
Click to hide internal directories.