Documentation
¶
Index ¶
- func CreateProtectedConnection(certType string, protectedURL string, cryptocontext *cryptutils.CryptoContext, ...) (connection *grpc.ClientConn, err error)
- func CreatePublicConnection(serverURL string, cryptocontext *cryptutils.CryptoContext, insecureConn bool) (connection *grpc.ClientConn, err error)
- func NewProtectedServerOptions(cryptocontext *cryptutils.CryptoContext, certProvider CertProvider, ...) ([]grpc.ServerOption, error)
- type CertProvider
- type GRPCConn
- func (conn *GRPCConn) Close()
- func (conn *GRPCConn) Invoke(ctx context.Context, method string, args any, reply any, ...) error
- func (conn *GRPCConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, ...) (grpc.ClientStream, error)
- func (conn *GRPCConn) Start(connection *grpc.ClientConn) error
- func (conn *GRPCConn) Stop()
- type GRPCServer
- type RegisteredService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProtectedConnection ¶
func CreateProtectedConnection( certType string, protectedURL string, cryptocontext *cryptutils.CryptoContext, certProvider CertProvider, insecureConn bool, ) (connection *grpc.ClientConn, err error)
CreateProtectedConnection creates protected GRPC connection.
func CreatePublicConnection ¶
func CreatePublicConnection(serverURL string, cryptocontext *cryptutils.CryptoContext, insecureConn bool) ( connection *grpc.ClientConn, err error, )
CreatePublicConnection creates public GRPC connection.
func NewProtectedServerOptions ¶
func NewProtectedServerOptions(cryptocontext *cryptutils.CryptoContext, certProvider CertProvider, certType string, insecureConn bool, ) ([]grpc.ServerOption, error)
NewProtectedServerOptions creates protected server options.
Types ¶
type CertProvider ¶
type CertProvider interface { GetCertificate(certType string, issuer []byte, serial string) (certURL, keyURL string, err error) SubscribeCertChanged(certType string) (<-chan *iamanager.CertInfo, error) }
CertProvider certificate provider interface.
type GRPCConn ¶
GRPCConn is a wrapper for grpc connection that blocks all incoming requests for stopped connection. It is used to recover connection without canceling grpc requests.
func (*GRPCConn) Close ¶
func (conn *GRPCConn) Close()
Close closes grpc connection and releases all spawned goroutines.
func (*GRPCConn) Invoke ¶
func (conn *GRPCConn) Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption, ) error
Invoke performs a unary RPC and returns after the response is received into reply.
func (*GRPCConn) NewStream ¶
func (conn *GRPCConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption, ) (grpc.ClientStream, error)
NewStream begins a streaming RPC.
type GRPCServer ¶
GRPCServer implementation restarts GRPC server on every server options update.
func NewGRPCServer ¶
func NewGRPCServer(address string) *GRPCServer
NewGRPCServer creates a new instance of GRPCServer.
func (*GRPCServer) RegisterService ¶
func (server *GRPCServer) RegisterService(desc *grpc.ServiceDesc, impl interface{})
RegisterService registers a new grpc service.
func (*GRPCServer) RestartServer ¶
func (server *GRPCServer) RestartServer(options []grpc.ServerOption) error
StartServer starts the gRPC server with new options.
type RegisteredService ¶
type RegisteredService struct {
// contains filtered or unexported fields
}
RegisteredService registered service information.