Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Close(host string) error
- func (c *Cache) Command(ctx context.Context, cmd, host string, cfg *connection.Config) (string, error)
- func (c *Cache) Create(host string, cfg *connection.Config) (connection.Connection, error)
- func (c *Cache) Get(host string) (connection.Connection, error)
- func (c *Cache) Login(host string, cfg *connection.Config) error
- func (c *Cache) ReCreate(host string, cfg *connection.Config) (connection.Connection, error)
- func (c *Cache) Remove(host string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { sync.Mutex Cache map[string]connection.Connection // maps host to Connection struct // contains filtered or unexported fields }
func (*Cache) Create ¶
func (c *Cache) Create(host string, cfg *connection.Config) (connection.Connection, error)
Create a new item, protected by mutex
func (*Cache) Get ¶
func (c *Cache) Get(host string) (connection.Connection, error)
Get a item from the cache, protected by mutex
func (*Cache) ReCreate ¶
func (c *Cache) ReCreate(host string, cfg *connection.Config) (connection.Connection, error)
ReCreate a item, protected by mutex
Click to show internal directories.
Click to hide internal directories.