server

package
v2.15.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtendedServiceGoTSRPCProxyGetAge        = "GetAge"
	ExtendedServiceGoTSRPCProxyGetFirstName  = "GetFirstName"
	ExtendedServiceGoTSRPCProxyGetLastName   = "GetLastName"
	ExtendedServiceGoTSRPCProxyGetMiddleName = "GetMiddleName"
	ExtendedServiceGoTSRPCProxyGetPerson     = "GetPerson"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base interface {
	GetFirstName(ctx context.Context) string
}

type ExtendedService

type ExtendedService interface {
	Middle
	Extra
	GetLastName(ctx context.Context) string
	GetPerson(ctx context.Context) Person
}

type ExtendedServiceGetAgeRequest

type ExtendedServiceGetAgeRequest struct {
}

type ExtendedServiceGetAgeResponse

type ExtendedServiceGetAgeResponse struct {
	RetGetAge_0 int
}

type ExtendedServiceGetFirstNameRequest

type ExtendedServiceGetFirstNameRequest struct {
}

type ExtendedServiceGetFirstNameResponse

type ExtendedServiceGetFirstNameResponse struct {
	RetGetFirstName_0 string
}

type ExtendedServiceGetLastNameRequest

type ExtendedServiceGetLastNameRequest struct {
}

type ExtendedServiceGetLastNameResponse

type ExtendedServiceGetLastNameResponse struct {
	RetGetLastName_0 string
}

type ExtendedServiceGetMiddleNameRequest

type ExtendedServiceGetMiddleNameRequest struct {
}

type ExtendedServiceGetMiddleNameResponse

type ExtendedServiceGetMiddleNameResponse struct {
	RetGetMiddleName_0 string
}

type ExtendedServiceGetPersonRequest

type ExtendedServiceGetPersonRequest struct {
}

type ExtendedServiceGetPersonResponse

type ExtendedServiceGetPersonResponse struct {
	RetGetPerson_0 Person
}

type ExtendedServiceGoRPCClient

type ExtendedServiceGoRPCClient struct {
	Client *gorpc.Client
}

func NewExtendedServiceGoRPCClient

func NewExtendedServiceGoRPCClient(addr string, tlsConfig *tls.Config) *ExtendedServiceGoRPCClient

func (*ExtendedServiceGoRPCClient) GetAge

func (tsc *ExtendedServiceGoRPCClient) GetAge() (retGetAge_0 int, clientErr error)

func (*ExtendedServiceGoRPCClient) GetFirstName

func (tsc *ExtendedServiceGoRPCClient) GetFirstName() (retGetFirstName_0 string, clientErr error)

func (*ExtendedServiceGoRPCClient) GetLastName

func (tsc *ExtendedServiceGoRPCClient) GetLastName() (retGetLastName_0 string, clientErr error)

func (*ExtendedServiceGoRPCClient) GetMiddleName

func (tsc *ExtendedServiceGoRPCClient) GetMiddleName() (retGetMiddleName_0 string, clientErr error)

func (*ExtendedServiceGoRPCClient) GetPerson

func (tsc *ExtendedServiceGoRPCClient) GetPerson() (retGetPerson_0 Person, clientErr error)

func (*ExtendedServiceGoRPCClient) Start

func (tsc *ExtendedServiceGoRPCClient) Start()

func (*ExtendedServiceGoRPCClient) Stop

func (tsc *ExtendedServiceGoRPCClient) Stop()

type ExtendedServiceGoRPCProxy

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

func NewExtendedServiceGoRPCProxy

func NewExtendedServiceGoRPCProxy(addr string, service ExtendedService, tlsConfig *tls.Config) *ExtendedServiceGoRPCProxy

func (*ExtendedServiceGoRPCProxy) Serve

func (p *ExtendedServiceGoRPCProxy) Serve() error

func (*ExtendedServiceGoRPCProxy) SetCallStatsHandler

func (p *ExtendedServiceGoRPCProxy) SetCallStatsHandler(handler gotsrpc.GoRPCCallStatsHandlerFun)

func (*ExtendedServiceGoRPCProxy) Start

func (p *ExtendedServiceGoRPCProxy) Start() error

func (*ExtendedServiceGoRPCProxy) Stop

func (p *ExtendedServiceGoRPCProxy) Stop()

type ExtendedServiceGoTSRPCClient

type ExtendedServiceGoTSRPCClient interface {
	GetAge(ctx go_context.Context) (retGetAge_0 int, clientErr error)
	GetFirstName(ctx go_context.Context) (retGetFirstName_0 string, clientErr error)
	GetLastName(ctx go_context.Context) (retGetLastName_0 string, clientErr error)
	GetMiddleName(ctx go_context.Context) (retGetMiddleName_0 string, clientErr error)
	GetPerson(ctx go_context.Context) (retGetPerson_0 Person, clientErr error)
}

type ExtendedServiceGoTSRPCProxy

type ExtendedServiceGoTSRPCProxy struct {
	EndPoint string
	// contains filtered or unexported fields
}

func NewDefaultExtendedServiceGoTSRPCProxy

func NewDefaultExtendedServiceGoTSRPCProxy(service ExtendedService) *ExtendedServiceGoTSRPCProxy

func NewExtendedServiceGoTSRPCProxy

func NewExtendedServiceGoTSRPCProxy(service ExtendedService, endpoint string) *ExtendedServiceGoTSRPCProxy

func (*ExtendedServiceGoTSRPCProxy) ServeHTTP

ServeHTTP exposes your service

type Extra

type Extra interface {
	GetAge(ctx context.Context) int
}

type HTTPExtendedServiceGoTSRPCClient

type HTTPExtendedServiceGoTSRPCClient struct {
	URL      string
	EndPoint string
	Client   gotsrpc.Client
}

func NewDefaultExtendedServiceGoTSRPCClient

func NewDefaultExtendedServiceGoTSRPCClient(url string) *HTTPExtendedServiceGoTSRPCClient

func NewExtendedServiceGoTSRPCClient

func NewExtendedServiceGoTSRPCClient(url string, endpoint string) *HTTPExtendedServiceGoTSRPCClient

func NewExtendedServiceGoTSRPCClientWithClient

func NewExtendedServiceGoTSRPCClientWithClient(url string, endpoint string, client *go_net_http.Client) *HTTPExtendedServiceGoTSRPCClient

func (*HTTPExtendedServiceGoTSRPCClient) GetAge

func (tsc *HTTPExtendedServiceGoTSRPCClient) GetAge(ctx go_context.Context) (retGetAge_0 int, clientErr error)

func (*HTTPExtendedServiceGoTSRPCClient) GetFirstName

func (tsc *HTTPExtendedServiceGoTSRPCClient) GetFirstName(ctx go_context.Context) (retGetFirstName_0 string, clientErr error)

func (*HTTPExtendedServiceGoTSRPCClient) GetLastName

func (tsc *HTTPExtendedServiceGoTSRPCClient) GetLastName(ctx go_context.Context) (retGetLastName_0 string, clientErr error)

func (*HTTPExtendedServiceGoTSRPCClient) GetMiddleName

func (tsc *HTTPExtendedServiceGoTSRPCClient) GetMiddleName(ctx go_context.Context) (retGetMiddleName_0 string, clientErr error)

func (*HTTPExtendedServiceGoTSRPCClient) GetPerson

func (tsc *HTTPExtendedServiceGoTSRPCClient) GetPerson(ctx go_context.Context) (retGetPerson_0 Person, clientErr error)

type Handler

type Handler struct{}

func (*Handler) GetAge

func (h *Handler) GetAge(_ context.Context) int

func (*Handler) GetFirstName

func (h *Handler) GetFirstName(_ context.Context) string

func (*Handler) GetLastName

func (h *Handler) GetLastName(_ context.Context) string

func (*Handler) GetMiddleName

func (h *Handler) GetMiddleName(_ context.Context) string

func (*Handler) GetPerson

func (h *Handler) GetPerson(_ context.Context) Person

type Middle

type Middle interface {
	Base
	GetMiddleName(ctx context.Context) string
}

type Person

type Person struct {
	FirstName  string `json:"firstName"`
	MiddleName string `json:"middleName"`
	LastName   string `json:"lastName"`
	Age        int    `json:"age"`
}

Jump to

Keyboard shortcuts

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