service

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: BSD-2-Clause Imports: 21 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial added in v0.3.1

func Dial(addr string) (*grpc.ClientConn, error)

func EmptyhealthCheckHandler added in v0.3.1

func EmptyhealthCheckHandler(context.Context) error

Types

type Closeable added in v0.3.1

type Closeable interface {
	Close() error
}

type GrpcHelthCheckClient added in v0.3.2

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

func NewGrpcServerHelthCheckClient added in v0.3.1

func NewGrpcServerHelthCheckClient(host string) (*GrpcHelthCheckClient, error)

func (*GrpcHelthCheckClient) Check added in v0.3.2

func (*GrpcHelthCheckClient) Close added in v0.3.2

func (c *GrpcHelthCheckClient) Close()

type GrpcServerInfo added in v0.3.1

type GrpcServerInfo struct {
	svcmeta.UnimplementedGrpcMetadataServer
	// contains filtered or unexported fields
}

func NewGrpcServerInfo added in v0.3.1

func NewGrpcServerInfo(svc *GrpcService) *GrpcServerInfo

func (*GrpcServerInfo) Metadata added in v0.3.2

type GrpcServerInfoClient added in v0.3.1

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

func NewGrpcServerInfoClient added in v0.3.1

func NewGrpcServerInfoClient(host string) (*GrpcServerInfoClient, error)

func (*GrpcServerInfoClient) Close added in v0.3.1

func (c *GrpcServerInfoClient) Close()

func (*GrpcServerInfoClient) Info added in v0.3.1

type GrpcService added in v0.3.1

type GrpcService struct {
	*Service
	// contains filtered or unexported fields
}

func NewGrpcService added in v0.3.2

func NewGrpcService(ctx context.Context, name string, desc *grpc.ServiceDesc,
	initHandler func(context.Context) (any, error),
	healthCheckHandler func(context.Context) error) (*GrpcService, error)

func (*GrpcService) Dispose added in v0.3.1

func (sh *GrpcService) Dispose()

func (*GrpcService) Info added in v0.3.1

func (sh *GrpcService) Info() map[string]string

func (*GrpcService) Serve added in v0.3.1

func (sh *GrpcService) Serve() error

type HeadlessService added in v0.3.1

type HeadlessService struct {
	*Service
	// contains filtered or unexported fields
}

func NewHeadlessService added in v0.3.1

func NewHeadlessService(ctx context.Context, name string, serve func(ctx context.Context) error) *HeadlessService

func (HeadlessService) Serve added in v0.3.1

func (s HeadlessService) Serve() error

type HttpService added in v0.3.1

type HttpService struct {
	*Service
	// contains filtered or unexported fields
}

func NewHttpService added in v0.3.1

func NewHttpService(ctx context.Context, name, resource string, initHandler func(context.Context) chi.Router) *HttpService

func (*HttpService) Serve added in v0.3.1

func (sh *HttpService) Serve() error

type Service

type Service struct {
	Name      string
	Addr      string
	StartTime time.Time
	Ctx       context.Context
}

func NewService added in v0.3.1

func NewService(ctx context.Context, name string) *Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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