Documentation ¶
Index ¶
- Variables
- func MirrorFromRPC(m *Mirror) (*mirrors.Mirror, error)
- func MirrorToRPC(m *mirrors.Mirror) (*Mirror, error)
- func StreamInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- type CLI
- func (c *CLI) AddMirror(ctx context.Context, in *Mirror) (*AddMirrorReply, error)
- func (c *CLI) ChangeStatus(ctx context.Context, in *ChangeStatusRequest) (*empty.Empty, error)
- func (c *CLI) Close() error
- func (c *CLI) GetVersion(context.Context, *empty.Empty) (*VersionReply, error)
- func (c *CLI) List(ctx context.Context, in *empty.Empty) (*MirrorListReply, error)
- func (c *CLI) MatchMirror(ctx context.Context, in *MatchRequest) (*MatchReply, error)
- func (c *CLI) MirrorInfo(ctx context.Context, in *MirrorIDRequest) (*Mirror, error)
- func (c *CLI) Ping(context.Context, *empty.Empty) (*empty.Empty, error)
- func (c *CLI) RefreshRepository(ctx context.Context, in *RefreshRepositoryRequest) (*empty.Empty, error)
- func (c *CLI) Reload(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (c *CLI) RemoveMirror(ctx context.Context, in *MirrorIDRequest) (*empty.Empty, error)
- func (c *CLI) ScanMirror(ctx context.Context, in *ScanMirrorRequest) (*ScanMirrorReply, error)
- func (c *CLI) SetDatabase(r *database.Redis)
- func (c *CLI) SetSignals(sig chan<- os.Signal)
- func (c *CLI) Start() error
- func (c *CLI) StatsFile(ctx context.Context, in *StatsFileRequest) (*StatsFileReply, error)
- func (c *CLI) StatsMirror(ctx context.Context, in *StatsMirrorRequest) (*StatsMirrorReply, error)
- func (c *CLI) UpdateMirror(ctx context.Context, in *Mirror) (*empty.Empty, error)
- func (c *CLI) Upgrade(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
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 MirrorToRPC ¶
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) ChangeStatus ¶
func (*CLI) GetVersion ¶
func (*CLI) MatchMirror ¶
func (*CLI) MirrorInfo ¶
func (*CLI) RefreshRepository ¶
func (*CLI) RemoveMirror ¶
func (*CLI) ScanMirror ¶
func (*CLI) SetDatabase ¶
func (*CLI) SetSignals ¶
func (*CLI) StatsMirror ¶
func (*CLI) UpdateMirror ¶
Click to show internal directories.
Click to hide internal directories.