grpc

package
v2.12.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewImpersonationService

func NewImpersonationService(address string, timeout time.Duration) (model.ImpersonationProvider, error)

Types

type GRPCClient

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

	Closable io.Closer
}

func (*GRPCClient) CanImpersonate

func (p *GRPCClient) CanImpersonate(ctx context.Context, appID string, adminUser, impUser model.User) (bool, error)

func (*GRPCClient) Close

func (p *GRPCClient) Close() error

type GRPCServer

type GRPCServer struct {
	// This is the real implementation
	Impl model.ImpersonationProvider
	pp.UnimplementedImpersonationProviderServer
}

Here is the gRPC server that GRPCClient talks to.

func (*GRPCServer) CanImpersonate

func (*GRPCServer) Close

Jump to

Keyboard shortcuts

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