diplomat

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 14 Imported by: 12

Documentation

Index

Constants

View Source
const (
	DEFAULTADDRESS string = "localhost:50051"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AmbassadorService

type AmbassadorService interface {
	GetSecret(ctx context.Context, in *pb.VaultRequest) (*pb.ElasticConfigVault, error)
	GetNamedSecret(ctx context.Context, in *pb.VaultRequestNamed) (*pb.ElasticConfigVault, error)
	Health(ctx context.Context, in *pb.HealthRequest) (*pb.HealthResponse, error)
	ShutDown(ctx context.Context, in *pb.ShutDownRequest) (*pb.ShutDownResponse, error)
	WaitForHealthyState() bool
}

type AmbassadorServiceClient

type AmbassadorServiceClient struct {
	Impl AmbassadorService
}

type AmbassadorServiceImpl

type AmbassadorServiceImpl struct {
	HttpClients service.OdysseiaClient
	Vault       diogenes.Client
	PodName     string
	Namespace   string
	FullPodName string
	pb.UnimplementedPtolemaiosServer
}

func CreateNewConfig

func CreateNewConfig() (*AmbassadorServiceImpl, error)

func (*AmbassadorServiceImpl) GetNamedSecret

func (a *AmbassadorServiceImpl) GetNamedSecret(ctx context.Context, request *pb.VaultRequestNamed) (*pb.ElasticConfigVault, error)

GetNamedSecret creates a 1 time token and returns the secret from vault

func (*AmbassadorServiceImpl) GetSecret

GetSecret creates a 1 time token and returns the secret from vault

func (*AmbassadorServiceImpl) Health

func (*AmbassadorServiceImpl) ShutDown

type ClientAmbassador

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

func NewClientAmbassador

func NewClientAmbassador() *ClientAmbassador

func (*ClientAmbassador) GetNamedSecret

func (c *ClientAmbassador) GetNamedSecret(ctx context.Context, request *pb.VaultRequestNamed) (*pb.ElasticConfigVault, error)

func (*ClientAmbassador) GetSecret

func (c *ClientAmbassador) GetSecret(ctx context.Context, request *pb.VaultRequest) (*pb.ElasticConfigVault, error)

func (*ClientAmbassador) Health

func (c *ClientAmbassador) Health(ctx context.Context, request *pb.HealthRequest) (*pb.HealthResponse, error)

func (*ClientAmbassador) ShutDown

func (c *ClientAmbassador) ShutDown(ctx context.Context, request *pb.ShutDownRequest) (*pb.ShutDownResponse, error)

func (*ClientAmbassador) WaitForHealthyState

func (c *ClientAmbassador) WaitForHealthyState() bool

type MockTraceService

type MockTraceService struct {
	mock.Mock
}

MockTraceService is a mock implementation of the TraceService interface

func (*MockTraceService) GetNamedSecret

func (m *MockTraceService) GetNamedSecret(ctx context.Context, request *pb.VaultRequestNamed) (*pb.ElasticConfigVault, error)

func (*MockTraceService) GetSecret

func (m *MockTraceService) GetSecret(ctx context.Context, request *pb.VaultRequest) (*pb.ElasticConfigVault, error)

func (*MockTraceService) Health

func (m *MockTraceService) Health(ctx context.Context, request *pb.HealthRequest) (*pb.HealthResponse, error)

func (*MockTraceService) ShutDown

func (m *MockTraceService) ShutDown(ctx context.Context, request *pb.ShutDownRequest) (*pb.ShutDownResponse, error)

func (*MockTraceService) WaitForHealthyState

func (m *MockTraceService) WaitForHealthyState() bool

Jump to

Keyboard shortcuts

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