Documentation
¶
Index ¶
- Variables
- func NewAPIServer(port int) *apiServer
- type EgressServer
- func (egs *EgressServer) Close()
- func (egs *EgressServer) CreateEgress(service *spec.Service) error
- func (egs *EgressServer) DeletePipeline(serviceName string)
- func (egs *EgressServer) Get(name string) (protocol.HTTPHandler, bool)
- func (egs *EgressServer) Handle(ctx context.HTTPContext)
- func (egs *EgressServer) Ready() bool
- func (egs *EgressServer) UpdatePipeline(service *spec.Service, instanceSpec []*spec.ServiceInstanceSpec) error
- type IngressServer
- type ObservabilityManager
- type Worker
Constants ¶
This section is empty.
Variables ¶
var ErrIngressClosed = fmt.Errorf("ingress has been closed")
ErrIngressClosed is the error when operating in a closed Ingress server
Functions ¶
func NewAPIServer ¶
func NewAPIServer(port int) *apiServer
NewAPIServer creates a initialed API server.
Types ¶
type EgressServer ¶
type EgressServer struct {
// contains filtered or unexported fields
}
EgressServer manages one/many ingress pipelines and one HTTPServer
func NewEgressServer ¶
func NewEgressServer(superSpec *supervisor.Spec, super *supervisor.Supervisor, serviceName string, service *service.Service, watch chan<- string) *EgressServer
NewEgressServer creates a initialized egress server
func (*EgressServer) Close ¶
func (egs *EgressServer) Close()
Close closes the Egress HTTPServer and Pipelines
func (*EgressServer) CreateEgress ¶
func (egs *EgressServer) CreateEgress(service *spec.Service) error
CreateEgress creates a default Egress HTTPServer.
func (*EgressServer) DeletePipeline ¶
func (egs *EgressServer) DeletePipeline(serviceName string)
DeletePipeline deletes one Egress pipeline according to the serviceName.
func (*EgressServer) Get ¶
func (egs *EgressServer) Get(name string) (protocol.HTTPHandler, bool)
Get gets egressServer itself as the default backend. egress server will handle the pipeline routing by itself.
func (*EgressServer) Handle ¶
func (egs *EgressServer) Handle(ctx context.HTTPContext)
Handle handles all egress traffic and route to desired pipeline according to the "X-MESH-RPC-SERVICE" field in header.
func (*EgressServer) Ready ¶
func (egs *EgressServer) Ready() bool
Ready checks Egress HTTPServer has been created or not. Not need to check pipelines, cause they will be dynamically added.
func (*EgressServer) UpdatePipeline ¶
func (egs *EgressServer) UpdatePipeline(service *spec.Service, instanceSpec []*spec.ServiceInstanceSpec) error
UpdatePipeline updates a local pipeline according to the informer.
type IngressServer ¶
type IngressServer struct {
// contains filtered or unexported fields
}
IngressServer manages one ingress pipeline and one HTTPServer
func NewIngressServer ¶
func NewIngressServer(super *supervisor.Supervisor, serviceName string) *IngressServer
NewIngressServer creates a initialized ingress server
func (*IngressServer) Close ¶
func (ings *IngressServer) Close()
Close closes the Ingress HTTPServer and Pipeline
func (*IngressServer) CreateIngress ¶
func (ings *IngressServer) CreateIngress(service *spec.Service, port uint32) error
CreateIngress creates local default pipeline and httpServer for ingress
func (*IngressServer) Get ¶
func (ings *IngressServer) Get(name string) (protocol.HTTPHandler, bool)
Get gets pipeline object for httpServer, it implements httpServer's MuxMapper interface
func (*IngressServer) Ready ¶
func (ings *IngressServer) Ready() bool
Ready checks ingress's pipeline and HTTPServer are created or not
func (*IngressServer) UpdatePipeline ¶
func (ings *IngressServer) UpdatePipeline(newSpec string) error
UpdatePipeline accepts new pipeline specs, and uses it to update ingress's HTTPPipeline with inheritance
type ObservabilityManager ¶
type ObservabilityManager struct {
// contains filtered or unexported fields
}
ObservabilityManager is the manager for observability.
func NewObservabilityServer ¶
func NewObservabilityServer(serviceName string) *ObservabilityManager
NewObservabilityServer creates an ObservabilityServer.
func (*ObservabilityManager) UpdateCanary ¶
func (server *ObservabilityManager) UpdateCanary(globalHeaders *spec.GlobalCanaryHeaders, version int64) error
UpdateCanary updates canary.
func (*ObservabilityManager) UpdateService ¶
func (server *ObservabilityManager) UpdateService(newService *spec.Service, version int64) error
UpdateService updates service.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is a sidecar in service mesh.
func New ¶
func New(superSpec *supervisor.Spec, super *supervisor.Supervisor) *Worker
New creates a mesh worker.
func (*Worker) Status ¶
func (w *Worker) Status() *supervisor.Status
Status returns the status of worker.