Documentation ¶
Index ¶
- type Context
- type KBFSContext
- func (c *KBFSContext) BindToKBFSSocket() (net.Listener, error)
- func (c *KBFSContext) ConfigureSocketInfo() error
- func (c *KBFSContext) GetDataDir() string
- func (c *KBFSContext) GetGlobalContext() *libkb.GlobalContext
- func (c *KBFSContext) GetKBFSSocket(clearError bool) (net.Conn, rpc.Transporter, bool, error)
- func (c *KBFSContext) GetLogDir() string
- func (c *KBFSContext) GetRunMode() libkb.RunMode
- func (c *KBFSContext) GetSocket(clearError bool) (net.Conn, rpc.Transporter, bool, error)
- func (c *KBFSContext) NewRPCLogFactory() rpc.LogFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface { GetRunMode() libkb.RunMode GetLogDir() string GetDataDir() string ConfigureSocketInfo() (err error) GetGlobalContext() *libkb.GlobalContext GetSocket(clearError bool) (net.Conn, rpc.Transporter, bool, error) NewRPCLogFactory() rpc.LogFactory GetKBFSSocket(clearError bool) (net.Conn, rpc.Transporter, bool, error) BindToKBFSSocket() (net.Listener, error) }
Context defines the environment for this package
type KBFSContext ¶
type KBFSContext struct {
// contains filtered or unexported fields
}
KBFSContext is an implementation for libkbfs.Context
func NewContext ¶
func NewContext() *KBFSContext
NewContext constructs a context. This should only be called once in main functions.
func NewContextFromGlobalContext ¶
func NewContextFromGlobalContext(g *libkb.GlobalContext) *KBFSContext
NewContextFromGlobalContext constructs a context
func (*KBFSContext) BindToKBFSSocket ¶
func (c *KBFSContext) BindToKBFSSocket() (net.Listener, error)
BindToKBFSSocket binds to the socket configured in `c.kbfsSocket`.
func (*KBFSContext) ConfigureSocketInfo ¶
func (c *KBFSContext) ConfigureSocketInfo() error
ConfigureSocketInfo configures a socket
func (*KBFSContext) GetDataDir ¶
func (c *KBFSContext) GetDataDir() string
GetDataDir returns log dir
func (*KBFSContext) GetGlobalContext ¶
func (c *KBFSContext) GetGlobalContext() *libkb.GlobalContext
GetGlobalContext returns the libkb global context.
func (*KBFSContext) GetKBFSSocket ¶
func (c *KBFSContext) GetKBFSSocket(clearError bool) ( net.Conn, rpc.Transporter, bool, error)
GetKBFSSocket dials the socket configured in `c.kbfsSocket`. Adapted from github.com/keybase/client/go/libkb.GlobalContext.GetSocket.
func (*KBFSContext) GetRunMode ¶
func (c *KBFSContext) GetRunMode() libkb.RunMode
GetRunMode returns run mode
func (*KBFSContext) GetSocket ¶
func (c *KBFSContext) GetSocket(clearError bool) ( net.Conn, rpc.Transporter, bool, error)
GetSocket returns a socket
func (*KBFSContext) NewRPCLogFactory ¶
func (c *KBFSContext) NewRPCLogFactory() rpc.LogFactory
NewRPCLogFactory constructs an RPC logger