grpc

package
v2.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTokenPayloadProvider

func NewTokenPayloadProvider(address string, timeout time.Duration) (model.TokenPayloadProvider, error)

Types

type GRPCClient

type GRPCClient struct {
	Client  pp.PayloadProviderServiceClient
	Timeout time.Duration

	Closable io.Closer
}

func (*GRPCClient) Close

func (p *GRPCClient) Close() error

func (*GRPCClient) TokenPayloadForApp

func (p *GRPCClient) TokenPayloadForApp(appId, appName, userID string) (map[string]interface{}, error)

type GRPCServer

type GRPCServer struct {
	// This is the real implementation
	Impl model.TokenPayloadProvider
	pp.UnimplementedPayloadProviderServiceServer
}

Here is the gRPC server that GRPCClient talks to.

func (*GRPCServer) Close

func (*GRPCServer) TokenPayload

func (s *GRPCServer) TokenPayload(ctx context.Context, request *pp.TokenPayloadRequest) (*pp.TokenPayloadResponse, error)

Jump to

Keyboard shortcuts

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