grpc

package
v1.7.75 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientConn

func NewClientConn(params ClientConnParams) (*grpc.ClientConn, error)

NewClientConn for gRPC.

func NewServiceClient

func NewServiceClient(params ServiceClientParams) v1.ServiceClient

NewServiceClient for gRPC.

func NewTask

func NewTask(params TaskParams) task.Task

NewTask for gRPC.

func Register

func Register(params RegisterParams)

Register client.

Types

type ClientConnParams

type ClientConnParams struct {
	fx.In

	Lifecycle fx.Lifecycle
	Config    *sgrpc.Config
	Logger    *zap.Logger
	Tracer    opentracing.Tracer
	Client    *client.Config
	Metrics   *prometheus.ClientMetrics
}

ClientConnParams for gRPC.

type RegisterParams

type RegisterParams struct {
	fx.In

	Lifecycle fx.Lifecycle
	Task      task.Task
}

RegisterParams for gRPC.

type ServiceClientParams

type ServiceClientParams struct {
	fx.In

	Conn *grpc.ClientConn
}

ServiceClientParams for gRPC.

type Task

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

Task for gRPC.

func (*Task) Perform

func (t *Task) Perform(ctx context.Context) ([]string, error)

Perform migrating the database.

type TaskParams

type TaskParams struct {
	fx.In

	Client v1.ServiceClient
	Config *client.Config
	Tracer opentracing.Tracer
	Logger *zap.Logger
}

TaskParams for gRPC.

Directories

Path Synopsis
logger
zap
trace

Jump to

Keyboard shortcuts

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