Documentation
¶
Overview ¶
Package grpc implements the MeshServiceServer which is the server API for MeshService service.
A specific adapter creates an instance of the struct Service (see below) and populates it with parameters, the adapter handler, etc. The adapter handler extends the default adapter handler (see package adapter). The struct Service is used as parameter in the func Start (see below) that starts and runs the MeshServiceServer. This is usually implemented in the package main of an adapter.
Index ¶
- Variables
- func ErrGrpcListener(err error) error
- func ErrGrpcServer(err error) error
- func ErrPanic(r interface{}) error
- func Start(s *Service, tr tracing.Handler) error
- type Service
- func (s *Service) ApplyOperation(ctx context.Context, req *meshes.ApplyRuleRequest) (*meshes.ApplyRuleResponse, error)
- func (s *Service) ComponentInfo(context.Context, *meshes.ComponentInfoRequest) (*meshes.ComponentInfoResponse, error)
- func (s *Service) CreateMeshInstance(ctx context.Context, req *meshes.CreateMeshInstanceRequest) (*meshes.CreateMeshInstanceResponse, error)
- func (s *Service) MeshName(ctx context.Context, req *meshes.MeshNameRequest) (*meshes.MeshNameResponse, error)
- func (s *Service) MeshVersions(context.Context, *meshes.MeshVersionsRequest) (*meshes.MeshVersionsResponse, error)
- func (s *Service) ProcessOAM(ctx context.Context, srv *meshes.ProcessOAMRequest) (*meshes.ProcessOAMResponse, error)
- func (s *Service) StreamEvents(ctx *meshes.EventsRequest, srv meshes.MeshService_StreamEventsServer) error
- func (s *Service) SupportedOperations(ctx context.Context, req *meshes.SupportedOperationsRequest) (*meshes.SupportedOperationsResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrRequestInvalidCode = "1000" ErrPanicCode = "1001" ErrGrpcListenerCode = "1002" ErrGrpcServerCode = "1003" ErrRequestInvalid = errors.New(ErrRequestInvalidCode, errors.Alert, []string{"Apply Request invalid"}, []string{}, []string{}, []string{}) )
Functions ¶
func ErrGrpcListener ¶
func ErrGrpcServer ¶
Types ¶
type Service ¶
type Service struct { Name string `json:"name"` Type string `json:"type"` Port string `json:"port"` Version string `json:"version"` GitSHA string `json:"gitsha"` StartedAt time.Time `json:"startedat"` TraceURL string `json:"traceurl"` Handler adapter.Handler Channel chan interface{} meshes.UnimplementedMeshServiceServer }
Service object holds all the information about the server parameters.
func (*Service) ApplyOperation ¶
func (s *Service) ApplyOperation(ctx context.Context, req *meshes.ApplyRuleRequest) (*meshes.ApplyRuleResponse, error)
ApplyOperation is the handler function for the method ApplyOperation.
func (*Service) ComponentInfo ¶ added in v0.1.14
func (s *Service) ComponentInfo(context.Context, *meshes.ComponentInfoRequest) (*meshes.ComponentInfoResponse, error)
ProcessOAM is the handler function for the method ProcessOAM
func (*Service) CreateMeshInstance ¶
func (s *Service) CreateMeshInstance(ctx context.Context, req *meshes.CreateMeshInstanceRequest) (*meshes.CreateMeshInstanceResponse, error)
CreateMeshInstance is the handler function for the method CreateMeshInstance.
func (*Service) MeshName ¶
func (s *Service) MeshName(ctx context.Context, req *meshes.MeshNameRequest) (*meshes.MeshNameResponse, error)
MeshName is the handler function for the method MeshName.
func (*Service) MeshVersions ¶ added in v0.1.14
func (s *Service) MeshVersions(context.Context, *meshes.MeshVersionsRequest) (*meshes.MeshVersionsResponse, error)
ProcessOAM is the handler function for the method ProcessOAM
func (*Service) ProcessOAM ¶ added in v0.1.13
func (s *Service) ProcessOAM(ctx context.Context, srv *meshes.ProcessOAMRequest) (*meshes.ProcessOAMResponse, error)
ProcessOAM is the handler function for the method ProcessOAM
func (*Service) StreamEvents ¶
func (s *Service) StreamEvents(ctx *meshes.EventsRequest, srv meshes.MeshService_StreamEventsServer) error
StreamEvents is the handler function for the method StreamEvents.
func (*Service) SupportedOperations ¶
func (s *Service) SupportedOperations(ctx context.Context, req *meshes.SupportedOperationsRequest) (*meshes.SupportedOperationsResponse, error)
SupportedOperations is the handler function for the method SupportedOperations.