server

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceGoTSRPCProxyVariantA = "VariantA"
	ServiceGoTSRPCProxyVariantB = "VariantB"
	ServiceGoTSRPCProxyVariantC = "VariantC"
	ServiceGoTSRPCProxyVariantD = "VariantD"
	ServiceGoTSRPCProxyVariantE = "VariantE"
	ServiceGoTSRPCProxyVariantF = "VariantF"
	ServiceGoTSRPCProxyVariantG = "VariantG"
	ServiceGoTSRPCProxyVariantH = "VariantH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ACustomType

type ACustomType string
const (
	ACustomTypeOne ACustomType = "one"
	ACustomTypeTwo ACustomType = "two"
)

type ACustomTypes

type ACustomTypes []ACustomType

type ACustomTypesMap

type ACustomTypesMap map[ACustomType]ACustomType

type BCustomType

type BCustomType string

type BCustomTypes

type BCustomTypes []BCustomType

type BCustomTypesMap

type BCustomTypesMap map[BCustomType]BCustomType

type Base

type Base struct {
	A1 Nested  `json:"a1"`
	A2 *Nested `json:"a2,omitempty"`
	A3 *Nested `json:"a3"`

	B1 string  `json:"b1"`
	B2 *string `json:"b2,omitempty"`
	B3 *string `json:"b3"`

	C1 any  `json:"c1"`
	C2 *any `json:"c2,omitempty"`
	C3 *any `json:"c3"`

	D1 ACustomType  `json:"d1"`
	D2 *ACustomType `json:"d2,omitempty"`
	D3 *ACustomType `json:"d3"`

	E1 ACustomTypes  `json:"e1"`
	E2 *ACustomTypes `json:"e2,omitempty"`
	E3 *ACustomTypes `json:"e3"`

	F1 ACustomTypesMap  `json:"f1"`
	F2 *ACustomTypesMap `json:"f2,omitempty"`
	F3 *ACustomTypesMap `json:"f3"`

	Two    []Nested
	Two1   [][]Nested
	Two2   []map[string]Nested
	Three  []*Nested
	Three1 []*string
	Four   map[string]Nested
	Five   map[string]*Nested
	Six    *struct {
		Foo string
	}
}

type HTTPServiceGoTSRPCClient

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

func NewDefaultServiceGoTSRPCClient

func NewDefaultServiceGoTSRPCClient(url string) *HTTPServiceGoTSRPCClient

func NewServiceGoTSRPCClient

func NewServiceGoTSRPCClient(url string, endpoint string) *HTTPServiceGoTSRPCClient

func NewServiceGoTSRPCClientWithClient

func NewServiceGoTSRPCClientWithClient(url string, endpoint string, client *go_net_http.Client) *HTTPServiceGoTSRPCClient

func (*HTTPServiceGoTSRPCClient) VariantA

func (tsc *HTTPServiceGoTSRPCClient) VariantA(ctx go_context.Context, i1 Base) (r1 Base, clientErr error)

func (*HTTPServiceGoTSRPCClient) VariantB

func (tsc *HTTPServiceGoTSRPCClient) VariantB(ctx go_context.Context, i1 BCustomType) (r1 BCustomType, clientErr error)

func (*HTTPServiceGoTSRPCClient) VariantC

func (tsc *HTTPServiceGoTSRPCClient) VariantC(ctx go_context.Context, i1 BCustomTypes) (r1 BCustomTypes, clientErr error)

func (*HTTPServiceGoTSRPCClient) VariantD

func (tsc *HTTPServiceGoTSRPCClient) VariantD(ctx go_context.Context, i1 BCustomTypesMap) (r1 BCustomTypesMap, clientErr error)

func (*HTTPServiceGoTSRPCClient) VariantE

func (tsc *HTTPServiceGoTSRPCClient) VariantE(ctx go_context.Context, i1 *Base) (r1 *Base, clientErr error)

func (*HTTPServiceGoTSRPCClient) VariantF

func (tsc *HTTPServiceGoTSRPCClient) VariantF(ctx go_context.Context, i1 []*Base) (r1 []*Base, clientErr error)

func (*HTTPServiceGoTSRPCClient) VariantG

func (tsc *HTTPServiceGoTSRPCClient) VariantG(ctx go_context.Context, i1 map[string]*Base) (r1 map[string]*Base, clientErr error)

func (*HTTPServiceGoTSRPCClient) VariantH

func (tsc *HTTPServiceGoTSRPCClient) VariantH(ctx go_context.Context, i1 Base, i2 *Base, i3 []*Base, i4 map[string]Base) (r1 Base, r2 *Base, r3 []*Base, r4 map[string]Base, clientErr error)

type Handler

type Handler struct{}

func (*Handler) VariantA

func (h *Handler) VariantA(_ context.Context, i1 Base) (r1 Base)

func (*Handler) VariantB

func (h *Handler) VariantB(_ context.Context, i1 BCustomType) (r1 BCustomType)

func (*Handler) VariantC

func (h *Handler) VariantC(_ context.Context, i1 BCustomTypes) (r1 BCustomTypes)

func (*Handler) VariantD

func (h *Handler) VariantD(_ context.Context, i1 BCustomTypesMap) (r1 BCustomTypesMap)

func (*Handler) VariantE

func (h *Handler) VariantE(_ context.Context, i1 *Base) (r1 *Base)

func (*Handler) VariantF

func (h *Handler) VariantF(_ context.Context, i1 []*Base) (r1 []*Base)

func (*Handler) VariantG

func (h *Handler) VariantG(_ context.Context, i1 map[string]*Base) (r1 map[string]*Base)

func (*Handler) VariantH

func (h *Handler) VariantH(_ context.Context, i1 Base, i2 *Base, i3 []*Base, i4 map[string]Base) (r1 Base, r2 *Base, r3 []*Base, r4 map[string]Base)

type Nested

type Nested struct {
	Foo string
}

type Service

type Service interface {
	VariantA(ctx context.Context, i1 Base) (r1 Base)
	VariantB(ctx context.Context, i1 BCustomType) (r1 BCustomType)
	VariantC(ctx context.Context, i1 BCustomTypes) (r1 BCustomTypes)
	VariantD(ctx context.Context, i1 BCustomTypesMap) (r1 BCustomTypesMap)

	VariantE(ctx context.Context, i1 *Base) (r1 *Base)

	VariantF(ctx context.Context, i1 []*Base) (r1 []*Base)

	VariantG(ctx context.Context, i1 map[string]*Base) (r1 map[string]*Base)

	VariantH(ctx context.Context, i1 Base, i2 *Base, i3 []*Base, i4 map[string]Base) (r1 Base, r2 *Base, r3 []*Base, r4 map[string]Base)
}

type ServiceGoRPCClient

type ServiceGoRPCClient struct {
	Client *gorpc.Client
}

func NewServiceGoRPCClient

func NewServiceGoRPCClient(addr string, tlsConfig *tls.Config) *ServiceGoRPCClient

func (*ServiceGoRPCClient) Start

func (tsc *ServiceGoRPCClient) Start()

func (*ServiceGoRPCClient) Stop

func (tsc *ServiceGoRPCClient) Stop()

func (*ServiceGoRPCClient) VariantA

func (tsc *ServiceGoRPCClient) VariantA(i1 Base) (r1 Base, clientErr error)

func (*ServiceGoRPCClient) VariantB

func (tsc *ServiceGoRPCClient) VariantB(i1 BCustomType) (r1 BCustomType, clientErr error)

func (*ServiceGoRPCClient) VariantC

func (tsc *ServiceGoRPCClient) VariantC(i1 BCustomTypes) (r1 BCustomTypes, clientErr error)

func (*ServiceGoRPCClient) VariantD

func (tsc *ServiceGoRPCClient) VariantD(i1 BCustomTypesMap) (r1 BCustomTypesMap, clientErr error)

func (*ServiceGoRPCClient) VariantE

func (tsc *ServiceGoRPCClient) VariantE(i1 *Base) (r1 *Base, clientErr error)

func (*ServiceGoRPCClient) VariantF

func (tsc *ServiceGoRPCClient) VariantF(i1 []*Base) (r1 []*Base, clientErr error)

func (*ServiceGoRPCClient) VariantG

func (tsc *ServiceGoRPCClient) VariantG(i1 map[string]*Base) (r1 map[string]*Base, clientErr error)

func (*ServiceGoRPCClient) VariantH

func (tsc *ServiceGoRPCClient) VariantH(i1 Base, i2 *Base, i3 []*Base, i4 map[string]Base) (r1 Base, r2 *Base, r3 []*Base, r4 map[string]Base, clientErr error)

type ServiceGoRPCProxy

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

func NewServiceGoRPCProxy

func NewServiceGoRPCProxy(addr string, service Service, tlsConfig *tls.Config) *ServiceGoRPCProxy

func (*ServiceGoRPCProxy) Serve

func (p *ServiceGoRPCProxy) Serve() error

func (*ServiceGoRPCProxy) SetCallStatsHandler

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

func (*ServiceGoRPCProxy) Start

func (p *ServiceGoRPCProxy) Start() error

func (*ServiceGoRPCProxy) Stop

func (p *ServiceGoRPCProxy) Stop()

type ServiceGoTSRPCClient

type ServiceGoTSRPCClient interface {
	VariantA(ctx go_context.Context, i1 Base) (r1 Base, clientErr error)
	VariantB(ctx go_context.Context, i1 BCustomType) (r1 BCustomType, clientErr error)
	VariantC(ctx go_context.Context, i1 BCustomTypes) (r1 BCustomTypes, clientErr error)
	VariantD(ctx go_context.Context, i1 BCustomTypesMap) (r1 BCustomTypesMap, clientErr error)
	VariantE(ctx go_context.Context, i1 *Base) (r1 *Base, clientErr error)
	VariantF(ctx go_context.Context, i1 []*Base) (r1 []*Base, clientErr error)
	VariantG(ctx go_context.Context, i1 map[string]*Base) (r1 map[string]*Base, clientErr error)
	VariantH(ctx go_context.Context, i1 Base, i2 *Base, i3 []*Base, i4 map[string]Base) (r1 Base, r2 *Base, r3 []*Base, r4 map[string]Base, clientErr error)
}

type ServiceGoTSRPCProxy

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

func NewDefaultServiceGoTSRPCProxy

func NewDefaultServiceGoTSRPCProxy(service Service) *ServiceGoTSRPCProxy

func NewServiceGoTSRPCProxy

func NewServiceGoTSRPCProxy(service Service, endpoint string) *ServiceGoTSRPCProxy

func (*ServiceGoTSRPCProxy) ServeHTTP

func (p *ServiceGoTSRPCProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP exposes your service

type ServiceVariantARequest

type ServiceVariantARequest struct {
	I1 Base
}

type ServiceVariantAResponse

type ServiceVariantAResponse struct {
	R1 Base
}

type ServiceVariantBRequest

type ServiceVariantBRequest struct {
	I1 BCustomType
}

type ServiceVariantBResponse

type ServiceVariantBResponse struct {
	R1 BCustomType
}

type ServiceVariantCRequest

type ServiceVariantCRequest struct {
	I1 BCustomTypes
}

type ServiceVariantCResponse

type ServiceVariantCResponse struct {
	R1 BCustomTypes
}

type ServiceVariantDRequest

type ServiceVariantDRequest struct {
	I1 BCustomTypesMap
}

type ServiceVariantDResponse

type ServiceVariantDResponse struct {
	R1 BCustomTypesMap
}

type ServiceVariantERequest

type ServiceVariantERequest struct {
	I1 *Base
}

type ServiceVariantEResponse

type ServiceVariantEResponse struct {
	R1 *Base
}

type ServiceVariantFRequest

type ServiceVariantFRequest struct {
	I1 []*Base
}

type ServiceVariantFResponse

type ServiceVariantFResponse struct {
	R1 []*Base
}

type ServiceVariantGRequest

type ServiceVariantGRequest struct {
	I1 map[string]*Base
}

type ServiceVariantGResponse

type ServiceVariantGResponse struct {
	R1 map[string]*Base
}

type ServiceVariantHRequest

type ServiceVariantHRequest struct {
	I1 Base
	I2 *Base
	I3 []*Base
	I4 map[string]Base
}

type ServiceVariantHResponse

type ServiceVariantHResponse struct {
	R1 Base
	R2 *Base
	R3 []*Base
	R4 map[string]Base
}

Jump to

Keyboard shortcuts

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