Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthAPI ¶
type AuthAPI struct {
// contains filtered or unexported fields
}
AuthAPI 权限插件
func (*AuthAPI) GetRequestMetadata ¶
func (*AuthAPI) RequireTransportSecurity ¶
type Factory ¶
type Factory interface {
// SyncClient 创建一个文件同步客户端,使用完成之后不要忘记执行 Close 关闭连接
SyncClient(endpoint string, token string) (FileSyncClient, error)
}
Factory RPC 客户端创建工厂
type FileSyncClient ¶
type FileSyncClient interface {
// SyncMeta 同步文件元数据
SyncMeta(fileToSync meta.File) ([]*protocol.File, error)
// SyncDiff 同步文件比较,用于获取本次要同步的文件
SyncDiff(files []*protocol.File, savePath func(f *protocol.File) string, syncOwner bool) (meta.FileNeedSyncs, error)
// SyncFiles 同步文件
SyncFiles(fileNeedSyncs meta.FileNeedSyncs, stage *collector.Stage) error
// RelayInfo 检查上游是否有变更
RelayInfo(names []string) ([]*protocol.RelayFile, error)
// Close close GRPC connection
Close()
}
FileSyncClient 文件同步客户端接口
func NewFileSyncClient ¶
func NewFileSyncClient(client protocol.SyncServiceClient, closeFn func()) FileSyncClient
NewFileSyncClient 创建一个文件同步客户端
type ServiceProvider ¶
type ServiceProvider struct{}
func (*ServiceProvider) Boot ¶
func (s *ServiceProvider) Boot(app *glacier.Glacier)
func (*ServiceProvider) Register ¶
func (s *ServiceProvider) Register(app *container.Container)
Click to show internal directories.
Click to hide internal directories.