rpc

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: MIT Imports: 29 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNameAlreadyTaken is returned when the request name is already taken by another mirror
	ErrNameAlreadyTaken = errors.New("name already taken")
)

Functions

func MirrorFromRPC

func MirrorFromRPC(m *Mirror) (*mirrors.Mirror, error)

func MirrorToRPC

func MirrorToRPC(m *mirrors.Mirror) (*Mirror, error)

func StreamInterceptor

func StreamInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

func UnaryInterceptor

func UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

Types

type CLI

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

CLI object handles the server side RPC of the CLI

func (*CLI) AddMirror

func (c *CLI) AddMirror(ctx context.Context, in *Mirror) (*AddMirrorReply, error)

func (*CLI) ChangeStatus

func (c *CLI) ChangeStatus(ctx context.Context, in *ChangeStatusRequest) (*empty.Empty, error)

func (*CLI) Close

func (c *CLI) Close() error

func (*CLI) GetVersion

func (c *CLI) GetVersion(context.Context, *empty.Empty) (*VersionReply, error)

func (*CLI) List

func (c *CLI) List(ctx context.Context, in *empty.Empty) (*MirrorListReply, error)

func (*CLI) MatchMirror

func (c *CLI) MatchMirror(ctx context.Context, in *MatchRequest) (*MatchReply, error)

func (*CLI) MirrorInfo

func (c *CLI) MirrorInfo(ctx context.Context, in *MirrorIDRequest) (*Mirror, error)

func (*CLI) Ping

func (c *CLI) Ping(context.Context, *empty.Empty) (*empty.Empty, error)

func (*CLI) RefreshRepository

func (c *CLI) RefreshRepository(ctx context.Context, in *RefreshRepositoryRequest) (*empty.Empty, error)

func (*CLI) Reload

func (c *CLI) Reload(ctx context.Context, in *empty.Empty) (*empty.Empty, error)

func (*CLI) RemoveMirror

func (c *CLI) RemoveMirror(ctx context.Context, in *MirrorIDRequest) (*empty.Empty, error)

func (*CLI) ScanMirror

func (c *CLI) ScanMirror(ctx context.Context, in *ScanMirrorRequest) (*ScanMirrorReply, error)

func (*CLI) SetDatabase

func (c *CLI) SetDatabase(r *database.Redis)

func (*CLI) SetSignals

func (c *CLI) SetSignals(sig chan<- os.Signal)

func (*CLI) Start

func (c *CLI) Start() error

func (*CLI) StatsFile

func (c *CLI) StatsFile(ctx context.Context, in *StatsFileRequest) (*StatsFileReply, error)

func (*CLI) StatsMirror

func (c *CLI) StatsMirror(ctx context.Context, in *StatsMirrorRequest) (*StatsMirrorReply, error)

func (*CLI) UpdateMirror

func (c *CLI) UpdateMirror(ctx context.Context, in *Mirror) (*empty.Empty, error)

func (*CLI) Upgrade

func (c *CLI) Upgrade(ctx context.Context, in *empty.Empty) (*empty.Empty, error)

Jump to

Keyboard shortcuts

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