bind

package
Version: v0.0.0-...-3763131 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindReadOnlyArgs

type BindReadOnlyArgs struct {
	Source      string
	Destination string
}

type BindReadOnlyReply

type BindReadOnlyReply struct {
	// Errors types cannot be passed as-is in RPC so they
	// must be converted to plain strings.
	// Details at https://github.com/golang/go/issues/23340
	Err string
}

type BindReadWriteArgs

type BindReadWriteArgs struct {
	Source      string
	Destination string
}

type BindReadWriteReply

type BindReadWriteReply struct {
	// Errors types cannot be passed as-is in RPC so they
	// must be converted to plain strings.
	// Details at https://github.com/golang/go/issues/23340
	Err string
}

type ListArgs

type ListArgs struct {
}

type ListReply

type ListReply struct {
	BindList []string
	// Errors types cannot be passed as-is in RPC so they
	// must be converted to plain strings.
	// Details at https://github.com/golang/go/issues/23340
	Err string
}

type PathBinder

type PathBinder interface {
	BindReadOnly(source string, destination string) error
	BindReadWrite(source string, destination string) error
	Unbind(destination string) error
	List() ([]string, error)
}

func NewFakePathBinder

func NewFakePathBinder() PathBinder

func NewLocalPathBinder

func NewLocalPathBinder() PathBinder

func NewRemoteBindClient

func NewRemoteBindClient(socketPath string) PathBinder

type RemoteBinderClient

type RemoteBinderClient struct {
	SocketPath string
	// contains filtered or unexported fields
}

RemoteBinderClient sends client requests to RPC

func (*RemoteBinderClient) BindReadOnly

func (r *RemoteBinderClient) BindReadOnly(source string, destination string) error

func (*RemoteBinderClient) BindReadWrite

func (r *RemoteBinderClient) BindReadWrite(source string, destination string) error

func (*RemoteBinderClient) List

func (r *RemoteBinderClient) List() ([]string, error)

func (*RemoteBinderClient) Unbind

func (r *RemoteBinderClient) Unbind(destination string) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server receives RPC requests

func NewServer

func NewServer(binder PathBinder) *Server

func (Server) BindReadOnly

func (s Server) BindReadOnly(args *BindReadOnlyArgs, reply *BindReadOnlyReply) error

func (Server) BindReadWrite

func (s Server) BindReadWrite(args *BindReadWriteArgs, reply *BindReadWriteReply) error

func (Server) List

func (s Server) List(args *ListArgs, reply *ListReply) error

func (Server) Unbind

func (s Server) Unbind(args *UnbindArgs, reply *UnbindReply) error

type UnbindArgs

type UnbindArgs struct {
	Destination string
}

type UnbindReply

type UnbindReply struct {
	// Errors types cannot be passed as-is in RPC so they
	// must be converted to plain strings.
	// Details at https://github.com/golang/go/issues/23340
	Err string
}

Jump to

Keyboard shortcuts

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