server

package
v2.14.1 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 (
	ServiceGoTSRPCProxyTime       = "Time"
	ServiceGoTSRPCProxyTimeStruct = "TimeStruct"
)

Variables

This section is empty.

Functions

This section is empty.

Types

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) Time

func (tsc *HTTPServiceGoTSRPCClient) Time(ctx go_context.Context, v time.Time) (retTime_0 time.Time, clientErr error)

func (*HTTPServiceGoTSRPCClient) TimeStruct

func (tsc *HTTPServiceGoTSRPCClient) TimeStruct(ctx go_context.Context, v TimeStruct) (retTimeStruct_0 TimeStruct, clientErr error)

type Handler

type Handler struct{}

func (*Handler) Time

func (h *Handler) Time(v time.Time) time.Time

func (*Handler) TimeStruct

func (h *Handler) TimeStruct(v TimeStruct) TimeStruct

type Service

type Service interface {
	Time(v time.Time) time.Time
	TimeStruct(v TimeStruct) TimeStruct
}

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) Time

func (tsc *ServiceGoRPCClient) Time(v time.Time) (retTime_0 time.Time, clientErr error)

func (*ServiceGoRPCClient) TimeStruct

func (tsc *ServiceGoRPCClient) TimeStruct(v TimeStruct) (retTimeStruct_0 TimeStruct, 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 {
	Time(ctx go_context.Context, v time.Time) (retTime_0 time.Time, clientErr error)
	TimeStruct(ctx go_context.Context, v TimeStruct) (retTimeStruct_0 TimeStruct, 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 ServiceTimeRequest

type ServiceTimeRequest struct {
	V time.Time
}

type ServiceTimeResponse

type ServiceTimeResponse struct {
	RetTime_0 time.Time
}

type ServiceTimeStructRequest

type ServiceTimeStructRequest struct {
	V TimeStruct
}

type ServiceTimeStructResponse

type ServiceTimeStructResponse struct {
	RetTimeStruct_0 TimeStruct
}

type TimeStruct

type TimeStruct struct {
	Time        time.Time  `json:"time"`
	TimePtr     *time.Time `json:"timePtr"`
	TimePtrOmit *time.Time `json:"timePtrOmit,omitempty"`
}

Jump to

Keyboard shortcuts

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