triple

package
v3.2.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TRIPLE protocol name
	TRIPLE = "tri"
)

Variables

This section is empty.

Functions

func GetProtocol

func GetProtocol() protocol.Protocol

Types

type DubboInvoker

type DubboInvoker struct {
	protocol.BaseInvoker
	// contains filtered or unexported fields
}

DubboInvoker is implement of protocol.Invoker, a dubboInvoker refer to one service and ip.

func NewDubbo3Invoker

func NewDubbo3Invoker(url *common.URL) (*DubboInvoker, error)

NewDubbo3Invoker constructor

func (*DubboInvoker) Destroy

func (di *DubboInvoker) Destroy()

Destroy destroy dubbo3 client invoker.

func (*DubboInvoker) Invoke

func (di *DubboInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result

Invoke call remoting.

func (*DubboInvoker) IsAvailable

func (di *DubboInvoker) IsAvailable() bool

IsAvailable check if invoker is available, now it is useless

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is TRIPLE adaptation layer representation. It makes use of tri.Server to provide functionality.

func NewServer

func NewServer() *Server

NewServer creates a new TRIPLE server. triServer would not be initialized since we could not get configurations here.

func (*Server) GetServiceInfo

func (s *Server) GetServiceInfo() map[string]grpc.ServiceInfo

func (*Server) GracefulStop

func (s *Server) GracefulStop()

GracefulStop TRIPLE server

func (*Server) RefreshService

func (s *Server) RefreshService(invoker protocol.Invoker, info *server.ServiceInfo)

todo(DMwangnima): extract a common function RefreshService refreshes Triple Service

func (*Server) Start

func (s *Server) Start(invoker protocol.Invoker, info *server.ServiceInfo)

Start TRIPLE server

func (*Server) Stop

func (s *Server) Stop()

Stop TRIPLE server

type TripleExporter

type TripleExporter struct {
	*protocol.BaseExporter
}

TripleExporter wraps BaseExporter

func NewTripleExporter

func NewTripleExporter(key string, invoker protocol.Invoker, exporterMap *sync.Map) *TripleExporter

func (*TripleExporter) UnExport

func (te *TripleExporter) UnExport()

UnExport and unregister Triple service from registry and memory.

type TripleInvoker

type TripleInvoker struct {
	protocol.BaseInvoker
	// contains filtered or unexported fields
}

func NewTripleInvoker

func NewTripleInvoker(url *common.URL) (*TripleInvoker, error)

func (*TripleInvoker) Destroy

func (ti *TripleInvoker) Destroy()

Destroy will destroy Triple's invoker and client, so it is only called once

func (*TripleInvoker) Invoke

func (ti *TripleInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result

Invoke is used to call client-side method.

func (*TripleInvoker) IsAvailable

func (ti *TripleInvoker) IsAvailable() bool

IsAvailable get available status

func (*TripleInvoker) IsDestroyed

func (ti *TripleInvoker) IsDestroyed() bool

IsDestroyed get destroyed status

type TripleProtocol

type TripleProtocol struct {
	protocol.BaseProtocol
	// contains filtered or unexported fields
}

func NewTripleProtocol

func NewTripleProtocol() *TripleProtocol

func (*TripleProtocol) Destroy

func (tp *TripleProtocol) Destroy()

func (*TripleProtocol) Export

func (tp *TripleProtocol) Export(invoker protocol.Invoker) protocol.Exporter

Export TRIPLE service for remote invocation

func (*TripleProtocol) Refer

func (tp *TripleProtocol) Refer(url *common.URL) protocol.Invoker

Refer a remote triple service

Directories

Path Synopsis
triple_health
Code generated by protoc-gen-triple.
Code generated by protoc-gen-triple.
internal
triple_reflection
Code generated by protoc-gen-triple.
Code generated by protoc-gen-triple.
Package triple is a slim RPC framework built on Protocol Buffers and net/http.
Package triple is a slim RPC framework built on Protocol Buffers and net/http.
internal/assert
Package assert is a minimal assert package using reflection.
Package assert is a minimal assert package using reflection.
internal/gen/proto/connect/ping/v1/pingv1connect
The connect.ping.v1 package contains an echo service designed to test the connect-go implementation.
The connect.ping.v1 package contains an echo service designed to test the connect-go implementation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL