Documentation ¶
Overview ¶
Package cache caches the key server capabilities and clients used for mutecrypt's cryptengine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
A Cache caches key server capabilities and clients used for mutecrypt's cryptengine.
func (*Cache) Get ¶
func (c *Cache) Get( domain, port, altHost, homedir, requiredMethod string, ) (*jsonclient.URLClient, *capabilities.Capabilities, error)
Get returns the cached JSON-RPC client and capabilities for the given domain and makes sure that the requiredMethod is supported. If no client has been cached, the cache is filled using the Set method with the given domain, port, altHost, and homedir parameters.
func (*Cache) Set ¶
Set requests capabilities information from key server at the given domain and port and caches the used JSON-RPC client and the resulting capabilities. If altHost is defined, it is used as the alternate hostname for the given domain name. homedir is used to load key server certificates.
func (*Cache) ShowCapabilities ¶
ShowCapabilities shows the cached capabilities of the key server at domain on stdout. If no capabilities have been cached, the cache is filled using the Set method with the given domain, port, altHost, and homedir parameters.