client

package
v0.0.0-...-6e99127 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package client provides GRPC utilities to simplify connecting to Trustero GRPC service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGRPCClient

func InitGRPCClient(cert, override string)

InitGRPCClient sets up the SSL certificate for subsequent Trustero GRPC connections.

func RandString

func RandString(n int) string

RandString returns a random string of length n.

Types

type ServerConnection

type ServerConnection struct {
	Connection    *grpc.ClientConn
	TlsDialOption grpc.DialOption
}
var ServerConn *ServerConnection

func (*ServerConnection) CloseClient

func (sc *ServerConnection) CloseClient() error

CloseClient closes a previously dialed Trustero GRPC connection.

func (*ServerConnection) Dial

func (sc *ServerConnection) Dial(token, host string, port int) (err error)

Dial makes a GRPC connection to Trustero GRPC service. A Trustero JWT bearer token must be provided.

func (*ServerConnection) GetReceptorClient

func (sc *ServerConnection) GetReceptorClient() (rc receptor_v1.ReceptorClient)

GetReceptorClient returns a Go client instance that implements the receptor_v1.Receptor Protobuf interface.

Jump to

Keyboard shortcuts

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