grpc

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 18 Imported by: 4

Documentation

Index

Constants

View Source
const (
	TestService_Get_FullMethodName = "/grpc.TestService/Get"
)

Variables

View Source
var TestService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.TestService",
	HandlerType: (*TestServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _TestService_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "test.proto",
}

TestService_ServiceDesc is the grpc.ServiceDesc for TestService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTestServiceServer added in v1.8.0

func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer)

Types

type Application

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

func NewApplication added in v1.4.0

func NewApplication(config config.Config) *Application

func (*Application) Client added in v1.4.0

func (app *Application) Client(ctx context.Context, name string) (*grpc.ClientConn, error)

func (*Application) Listen added in v1.15.12

func (app *Application) Listen(l net.Listener) error

func (*Application) Run

func (app *Application) Run(host ...string) error

func (*Application) Server

func (app *Application) Server() *grpc.Server

func (*Application) Shutdown added in v1.15.12

func (app *Application) Shutdown(force ...bool) error

func (*Application) UnaryClientInterceptorGroups added in v1.4.0

func (app *Application) UnaryClientInterceptorGroups(unaryClientInterceptorGroups map[string][]grpc.UnaryClientInterceptor)

func (*Application) UnaryServerInterceptors added in v1.4.0

func (app *Application) UnaryServerInterceptors(unaryServerInterceptors []grpc.UnaryServerInterceptor)

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (r *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (r *ServiceProvider) Register(app foundation.Application)

func (*ServiceProvider) Relationship added in v1.15.12

func (r *ServiceProvider) Relationship() binding.Relationship

type TestRequest added in v1.8.0

type TestRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*TestRequest) Descriptor deprecated added in v1.8.0

func (*TestRequest) Descriptor() ([]byte, []int)

Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.

func (*TestRequest) GetName added in v1.8.0

func (x *TestRequest) GetName() string

func (*TestRequest) ProtoMessage added in v1.8.0

func (*TestRequest) ProtoMessage()

func (*TestRequest) ProtoReflect added in v1.15.12

func (x *TestRequest) ProtoReflect() protoreflect.Message

func (*TestRequest) Reset added in v1.8.0

func (x *TestRequest) Reset()

func (*TestRequest) String added in v1.8.0

func (x *TestRequest) String() string

type TestResponse added in v1.8.0

type TestResponse struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*TestResponse) Descriptor deprecated added in v1.8.0

func (*TestResponse) Descriptor() ([]byte, []int)

Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.

func (*TestResponse) GetCode added in v1.8.0

func (x *TestResponse) GetCode() int32

func (*TestResponse) GetMessage added in v1.8.0

func (x *TestResponse) GetMessage() string

func (*TestResponse) ProtoMessage added in v1.8.0

func (*TestResponse) ProtoMessage()

func (*TestResponse) ProtoReflect added in v1.15.12

func (x *TestResponse) ProtoReflect() protoreflect.Message

func (*TestResponse) Reset added in v1.8.0

func (x *TestResponse) Reset()

func (*TestResponse) String added in v1.8.0

func (x *TestResponse) String() string

type TestServiceClient added in v1.8.0

type TestServiceClient interface {
	Get(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
}

TestServiceClient is the client API for TestService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewTestServiceClient added in v1.8.0

func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient

type TestServiceServer added in v1.8.0

type TestServiceServer interface {
	Get(context.Context, *TestRequest) (*TestResponse, error)
	// contains filtered or unexported methods
}

TestServiceServer is the server API for TestService service. All implementations must embed UnimplementedTestServiceServer for forward compatibility

type UnimplementedTestServiceServer added in v1.8.0

type UnimplementedTestServiceServer struct {
}

UnimplementedTestServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTestServiceServer) Get added in v1.8.0

type UnsafeTestServiceServer added in v1.15.12

type UnsafeTestServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestServiceServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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