kaas

package module
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: Apache-2.0 Imports: 14 Imported by: 6

README

kaas (Krab As A Service)

Build Status

kaas is intended to make it easy to use the krab keystore within projects that have multiple readers and writers for ipfs keystores. Due to the usage of badger, we can only have a single process that serves as a reader+writer, or multiple processes performing read-only tasks.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(listenAddr, protocol string, cfg *config.TemporalConfig) error

NewServer is used to create, and run a krab keystore server

Types

type Client

type Client struct {
	pb.ServiceClient
	// contains filtered or unexported fields
}

Client is how we interface with the kaas grpc key manager

func NewClient

func NewClient(opts config.Services, fallback bool) (*Client, error)

NewClient is used to instantiate our kaas client in primary or fallback mode

func (*Client) Close

func (kc *Client) Close() error

Close shuts down the client's gRPC connection

type Server

type Server struct {
	pb.ServiceServer
	// contains filtered or unexported fields
}

Server is the backend for Krab

func (*Server) DeletePrivateKey

func (s *Server) DeletePrivateKey(ctx context.Context, req *pb.KeyDelete) (*pb.Response, error)

DeletePrivateKey is used to remove a private key from the keystore

func (*Server) GetPrivateKey

func (s *Server) GetPrivateKey(ctx context.Context, req *pb.KeyGet) (*pb.Response, error)

GetPrivateKey is used to retrieve a private key by searching for its name

func (*Server) PutPrivateKey

func (s *Server) PutPrivateKey(ctx context.Context, req *pb.KeyPut) (*pb.Response, error)

PutPrivateKey is used to store a new private key

Jump to

Keyboard shortcuts

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