video

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildStatus_name = map[int32]string{
	0: "PENDING",
	1: "PROCESSING",
	2: "SUCCESS",
	3: "FAILED",
	4: "CANCELED",
}
View Source
var BuildStatus_value = map[string]int32{
	"PENDING":    0,
	"PROCESSING": 1,
	"SUCCESS":    2,
	"FAILED":     3,
	"CANCELED":   4,
}
View Source
var SplitStrategy_name = map[int32]string{
	0: "SIZE",
	1: "TIME",
}
View Source
var SplitStrategy_value = map[string]int32{
	"SIZE": 0,
	"TIME": 1,
}

Functions

func RegisterBuildHandler

func RegisterBuildHandler(s server.Server, hdlr BuildHandler, opts ...server.HandlerOption) error

func RegisterCacheHandler

func RegisterCacheHandler(s server.Server, hdlr CacheHandler, opts ...server.HandlerOption) error

func RegisterTaskHandler

func RegisterTaskHandler(s server.Server, hdlr TaskHandler, opts ...server.HandlerOption) error

Types

type Audio

type Audio struct {
	// 音频文件地址
	// 网络地址使用http://或https://前缀
	// 内置存储使用file://前缀
	File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// 时间戳的偏移值, 单位为毫秒
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// 持续时间, 单位为毫秒,超出此时间的内容会被截断
	Duration             int64    `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

音频

func (*Audio) Descriptor

func (*Audio) Descriptor() ([]byte, []int)

func (*Audio) GetDuration added in v1.0.1

func (m *Audio) GetDuration() int64

func (*Audio) GetFile

func (m *Audio) GetFile() string

func (*Audio) GetOffset added in v1.0.5

func (m *Audio) GetOffset() int64

func (*Audio) ProtoMessage

func (*Audio) ProtoMessage()

func (*Audio) Reset

func (m *Audio) Reset()

func (*Audio) String

func (m *Audio) String() string

func (*Audio) XXX_DiscardUnknown

func (m *Audio) XXX_DiscardUnknown()

func (*Audio) XXX_Marshal

func (m *Audio) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Audio) XXX_Merge

func (m *Audio) XXX_Merge(src proto.Message)

func (*Audio) XXX_Size

func (m *Audio) XXX_Size() int

func (*Audio) XXX_Unmarshal

func (m *Audio) XXX_Unmarshal(b []byte) error

type BuildHandler

type BuildHandler interface {
	// 将多个视频合并为一个视频
	Combine(context.Context, *CombineRequest, *BuildResponse) error
	// 将一个视频切割为多个视频
	Split(context.Context, *SplitRequest, *BuildResponse) error
	// 将图片和音频制作为一个视频
	Render(context.Context, *RenderRequest, *BuildResponse) error
}

type BuildResponse

type BuildResponse struct {
	// 状态
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// 任务ID
	TaskID               string   `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

构建回复

func (*BuildResponse) Descriptor

func (*BuildResponse) Descriptor() ([]byte, []int)

func (*BuildResponse) GetStatus

func (m *BuildResponse) GetStatus() *Status

func (*BuildResponse) GetTaskID

func (m *BuildResponse) GetTaskID() string

func (*BuildResponse) ProtoMessage

func (*BuildResponse) ProtoMessage()

func (*BuildResponse) Reset

func (m *BuildResponse) Reset()

func (*BuildResponse) String

func (m *BuildResponse) String() string

func (*BuildResponse) XXX_DiscardUnknown

func (m *BuildResponse) XXX_DiscardUnknown()

func (*BuildResponse) XXX_Marshal

func (m *BuildResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BuildResponse) XXX_Merge

func (m *BuildResponse) XXX_Merge(src proto.Message)

func (*BuildResponse) XXX_Size

func (m *BuildResponse) XXX_Size() int

func (*BuildResponse) XXX_Unmarshal

func (m *BuildResponse) XXX_Unmarshal(b []byte) error

type BuildService

type BuildService interface {
	// 将多个视频合并为一个视频
	Combine(ctx context.Context, in *CombineRequest, opts ...client.CallOption) (*BuildResponse, error)
	// 将一个视频切割为多个视频
	Split(ctx context.Context, in *SplitRequest, opts ...client.CallOption) (*BuildResponse, error)
	// 将图片和音频制作为一个视频
	Render(ctx context.Context, in *RenderRequest, opts ...client.CallOption) (*BuildResponse, error)
}

func NewBuildService

func NewBuildService(name string, c client.Client) BuildService

type BuildStatus

type BuildStatus int32

构建状态

const (
	BuildStatus_PENDING    BuildStatus = 0
	BuildStatus_PROCESSING BuildStatus = 1
	BuildStatus_SUCCESS    BuildStatus = 2
	BuildStatus_FAILED     BuildStatus = 3
	BuildStatus_CANCELED   BuildStatus = 4
)

func (BuildStatus) EnumDescriptor

func (BuildStatus) EnumDescriptor() ([]byte, []int)

func (BuildStatus) String

func (x BuildStatus) String() string

type CacheHandler

type CacheHandler interface {
	// 将数据转存为文件
	Save(context.Context, *SaveRequest, *CacheResponse) error
}

type CacheResponse

type CacheResponse struct {
	// 状态
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// 文件地址,以file://为前缀
	File                 string   `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

缓存回复

func (*CacheResponse) Descriptor

func (*CacheResponse) Descriptor() ([]byte, []int)

func (*CacheResponse) GetFile

func (m *CacheResponse) GetFile() string

func (*CacheResponse) GetStatus

func (m *CacheResponse) GetStatus() *Status

func (*CacheResponse) ProtoMessage

func (*CacheResponse) ProtoMessage()

func (*CacheResponse) Reset

func (m *CacheResponse) Reset()

func (*CacheResponse) String

func (m *CacheResponse) String() string

func (*CacheResponse) XXX_DiscardUnknown

func (m *CacheResponse) XXX_DiscardUnknown()

func (*CacheResponse) XXX_Marshal

func (m *CacheResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CacheResponse) XXX_Merge

func (m *CacheResponse) XXX_Merge(src proto.Message)

func (*CacheResponse) XXX_Size

func (m *CacheResponse) XXX_Size() int

func (*CacheResponse) XXX_Unmarshal

func (m *CacheResponse) XXX_Unmarshal(b []byte) error

type CacheService

type CacheService interface {
	// 将数据转存为文件
	Save(ctx context.Context, in *SaveRequest, opts ...client.CallOption) (*CacheResponse, error)
}

func NewCacheService

func NewCacheService(name string, c client.Client) CacheService

type CancelRequest

type CancelRequest struct {
	// 任务ID
	TaskID               string   `protobuf:"bytes,1,opt,name=taskID,proto3" json:"taskID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

取消请求

func (*CancelRequest) Descriptor

func (*CancelRequest) Descriptor() ([]byte, []int)

func (*CancelRequest) GetTaskID

func (m *CancelRequest) GetTaskID() string

func (*CancelRequest) ProtoMessage

func (*CancelRequest) ProtoMessage()

func (*CancelRequest) Reset

func (m *CancelRequest) Reset()

func (*CancelRequest) String

func (m *CancelRequest) String() string

func (*CancelRequest) XXX_DiscardUnknown

func (m *CancelRequest) XXX_DiscardUnknown()

func (*CancelRequest) XXX_Marshal

func (m *CancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelRequest) XXX_Merge

func (m *CancelRequest) XXX_Merge(src proto.Message)

func (*CancelRequest) XXX_Size

func (m *CancelRequest) XXX_Size() int

func (*CancelRequest) XXX_Unmarshal

func (m *CancelRequest) XXX_Unmarshal(b []byte) error

type CancelResponse

type CancelResponse struct {
	// 状态
	Status               *Status  `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

取消回复

func (*CancelResponse) Descriptor

func (*CancelResponse) Descriptor() ([]byte, []int)

func (*CancelResponse) GetStatus

func (m *CancelResponse) GetStatus() *Status

func (*CancelResponse) ProtoMessage

func (*CancelResponse) ProtoMessage()

func (*CancelResponse) Reset

func (m *CancelResponse) Reset()

func (*CancelResponse) String

func (m *CancelResponse) String() string

func (*CancelResponse) XXX_DiscardUnknown

func (m *CancelResponse) XXX_DiscardUnknown()

func (*CancelResponse) XXX_Marshal

func (m *CancelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelResponse) XXX_Merge

func (m *CancelResponse) XXX_Merge(src proto.Message)

func (*CancelResponse) XXX_Size

func (m *CancelResponse) XXX_Size() int

func (*CancelResponse) XXX_Unmarshal

func (m *CancelResponse) XXX_Unmarshal(b []byte) error

type CombineRequest

type CombineRequest struct {
	// 视频文件地址
	// 网络地址使用http://或https://前缀
	// 内置存储使用file://前缀
	Video                []string `protobuf:"bytes,1,rep,name=video,proto3" json:"video,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

合并请求

func (*CombineRequest) Descriptor

func (*CombineRequest) Descriptor() ([]byte, []int)

func (*CombineRequest) GetVideo

func (m *CombineRequest) GetVideo() []string

func (*CombineRequest) ProtoMessage

func (*CombineRequest) ProtoMessage()

func (*CombineRequest) Reset

func (m *CombineRequest) Reset()

func (*CombineRequest) String

func (m *CombineRequest) String() string

func (*CombineRequest) XXX_DiscardUnknown

func (m *CombineRequest) XXX_DiscardUnknown()

func (*CombineRequest) XXX_Marshal

func (m *CombineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CombineRequest) XXX_Merge

func (m *CombineRequest) XXX_Merge(src proto.Message)

func (*CombineRequest) XXX_Size

func (m *CombineRequest) XXX_Size() int

func (*CombineRequest) XXX_Unmarshal

func (m *CombineRequest) XXX_Unmarshal(b []byte) error

type Image

type Image struct {
	// 图片文件地址
	// 网络地址使用http://或https://前缀
	// 内置存储使用file://前缀
	File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// 时间戳的偏移值, 单位为毫秒
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// 持续时间, 单位为毫秒,超出此时间的内容会被截断
	Duration             int64    `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

图片

func (*Image) Descriptor

func (*Image) Descriptor() ([]byte, []int)

func (*Image) GetDuration added in v1.0.1

func (m *Image) GetDuration() int64

func (*Image) GetFile

func (m *Image) GetFile() string

func (*Image) GetOffset added in v1.0.5

func (m *Image) GetOffset() int64

func (*Image) ProtoMessage

func (*Image) ProtoMessage()

func (*Image) Reset

func (m *Image) Reset()

func (*Image) String

func (m *Image) String() string

func (*Image) XXX_DiscardUnknown

func (m *Image) XXX_DiscardUnknown()

func (*Image) XXX_Marshal

func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Image) XXX_Merge

func (m *Image) XXX_Merge(src proto.Message)

func (*Image) XXX_Size

func (m *Image) XXX_Size() int

func (*Image) XXX_Unmarshal

func (m *Image) XXX_Unmarshal(b []byte) error

type Notification added in v1.0.3

type Notification struct {
	// 任务ID
	TaskID string `protobuf:"bytes,1,opt,name=taskID,proto3" json:"taskID,omitempty"`
	// 状态
	Status               string   `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

通知

func (*Notification) Descriptor added in v1.0.3

func (*Notification) Descriptor() ([]byte, []int)

func (*Notification) GetStatus added in v1.0.3

func (m *Notification) GetStatus() string

func (*Notification) GetTaskID added in v1.0.3

func (m *Notification) GetTaskID() string

func (*Notification) ProtoMessage added in v1.0.3

func (*Notification) ProtoMessage()

func (*Notification) Reset added in v1.0.3

func (m *Notification) Reset()

func (*Notification) String added in v1.0.3

func (m *Notification) String() string

func (*Notification) XXX_DiscardUnknown added in v1.0.3

func (m *Notification) XXX_DiscardUnknown()

func (*Notification) XXX_Marshal added in v1.0.3

func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Notification) XXX_Merge added in v1.0.3

func (m *Notification) XXX_Merge(src proto.Message)

func (*Notification) XXX_Size added in v1.0.3

func (m *Notification) XXX_Size() int

func (*Notification) XXX_Unmarshal added in v1.0.3

func (m *Notification) XXX_Unmarshal(b []byte) error

type QueryRequest

type QueryRequest struct {
	// 任务ID
	TaskID               string   `protobuf:"bytes,1,opt,name=taskID,proto3" json:"taskID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

查询请求

func (*QueryRequest) Descriptor

func (*QueryRequest) Descriptor() ([]byte, []int)

func (*QueryRequest) GetTaskID

func (m *QueryRequest) GetTaskID() string

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) Reset

func (m *QueryRequest) Reset()

func (*QueryRequest) String

func (m *QueryRequest) String() string

func (*QueryRequest) XXX_DiscardUnknown

func (m *QueryRequest) XXX_DiscardUnknown()

func (*QueryRequest) XXX_Marshal

func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRequest) XXX_Merge

func (m *QueryRequest) XXX_Merge(src proto.Message)

func (*QueryRequest) XXX_Size

func (m *QueryRequest) XXX_Size() int

func (*QueryRequest) XXX_Unmarshal

func (m *QueryRequest) XXX_Unmarshal(b []byte) error

type QueryResponse

type QueryResponse struct {
	// 状态
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// 构建状态
	BuildStatus BuildStatus `protobuf:"varint,2,opt,name=buildStatus,proto3,enum=video.BuildStatus" json:"buildStatus,omitempty"`
	// 视频的存放地址,仅当构建成功时有值
	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	// 任务创建时间
	CreatedAt int64 `protobuf:"varint,10,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	// 任务更新时间
	UpdatedAt            int64    `protobuf:"varint,11,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

查询回复

func (*QueryResponse) Descriptor

func (*QueryResponse) Descriptor() ([]byte, []int)

func (*QueryResponse) GetBuildStatus

func (m *QueryResponse) GetBuildStatus() BuildStatus

func (*QueryResponse) GetCreatedAt

func (m *QueryResponse) GetCreatedAt() int64

func (*QueryResponse) GetStatus

func (m *QueryResponse) GetStatus() *Status

func (*QueryResponse) GetUpdatedAt

func (m *QueryResponse) GetUpdatedAt() int64

func (*QueryResponse) GetUrl added in v1.0.2

func (m *QueryResponse) GetUrl() string

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) Reset

func (m *QueryResponse) Reset()

func (*QueryResponse) String

func (m *QueryResponse) String() string

func (*QueryResponse) XXX_DiscardUnknown

func (m *QueryResponse) XXX_DiscardUnknown()

func (*QueryResponse) XXX_Marshal

func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryResponse) XXX_Merge

func (m *QueryResponse) XXX_Merge(src proto.Message)

func (*QueryResponse) XXX_Size

func (m *QueryResponse) XXX_Size() int

func (*QueryResponse) XXX_Unmarshal

func (m *QueryResponse) XXX_Unmarshal(b []byte) error

type RenderRequest

type RenderRequest struct {
	// 图片集
	Image []*Image `protobuf:"bytes,1,rep,name=image,proto3" json:"image,omitempty"`
	// 音频集
	Audio                []*Audio `protobuf:"bytes,2,rep,name=audio,proto3" json:"audio,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

渲染请求

func (*RenderRequest) Descriptor

func (*RenderRequest) Descriptor() ([]byte, []int)

func (*RenderRequest) GetAudio

func (m *RenderRequest) GetAudio() []*Audio

func (*RenderRequest) GetImage

func (m *RenderRequest) GetImage() []*Image

func (*RenderRequest) ProtoMessage

func (*RenderRequest) ProtoMessage()

func (*RenderRequest) Reset

func (m *RenderRequest) Reset()

func (*RenderRequest) String

func (m *RenderRequest) String() string

func (*RenderRequest) XXX_DiscardUnknown

func (m *RenderRequest) XXX_DiscardUnknown()

func (*RenderRequest) XXX_Marshal

func (m *RenderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RenderRequest) XXX_Merge

func (m *RenderRequest) XXX_Merge(src proto.Message)

func (*RenderRequest) XXX_Size

func (m *RenderRequest) XXX_Size() int

func (*RenderRequest) XXX_Unmarshal

func (m *RenderRequest) XXX_Unmarshal(b []byte) error

type SaveRequest

type SaveRequest struct {
	// 字节数据
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// 文件扩展名,不包含.号
	Extension            string   `protobuf:"bytes,2,opt,name=extension,proto3" json:"extension,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

保存请求

func (*SaveRequest) Descriptor

func (*SaveRequest) Descriptor() ([]byte, []int)

func (*SaveRequest) GetData

func (m *SaveRequest) GetData() []byte

func (*SaveRequest) GetExtension added in v1.0.4

func (m *SaveRequest) GetExtension() string

func (*SaveRequest) ProtoMessage

func (*SaveRequest) ProtoMessage()

func (*SaveRequest) Reset

func (m *SaveRequest) Reset()

func (*SaveRequest) String

func (m *SaveRequest) String() string

func (*SaveRequest) XXX_DiscardUnknown

func (m *SaveRequest) XXX_DiscardUnknown()

func (*SaveRequest) XXX_Marshal

func (m *SaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SaveRequest) XXX_Merge

func (m *SaveRequest) XXX_Merge(src proto.Message)

func (*SaveRequest) XXX_Size

func (m *SaveRequest) XXX_Size() int

func (*SaveRequest) XXX_Unmarshal

func (m *SaveRequest) XXX_Unmarshal(b []byte) error

type SplitRequest

type SplitRequest struct {
	// 视频文件地址
	// 网络地址使用http://或https://前缀
	// 内置存储使用file://前缀
	Video string `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
	// 切割策略
	Strategy SplitStrategy `protobuf:"varint,2,opt,name=strategy,proto3,enum=video.SplitStrategy" json:"strategy,omitempty"`
	// 切割因子,strategy=SIZE时,此值的单位是字节,strategy=TIME时,此值的单位时秒
	Factor               int32    `protobuf:"varint,3,opt,name=factor,proto3" json:"factor,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

切割请求

func (*SplitRequest) Descriptor

func (*SplitRequest) Descriptor() ([]byte, []int)

func (*SplitRequest) GetFactor

func (m *SplitRequest) GetFactor() int32

func (*SplitRequest) GetStrategy

func (m *SplitRequest) GetStrategy() SplitStrategy

func (*SplitRequest) GetVideo

func (m *SplitRequest) GetVideo() string

func (*SplitRequest) ProtoMessage

func (*SplitRequest) ProtoMessage()

func (*SplitRequest) Reset

func (m *SplitRequest) Reset()

func (*SplitRequest) String

func (m *SplitRequest) String() string

func (*SplitRequest) XXX_DiscardUnknown

func (m *SplitRequest) XXX_DiscardUnknown()

func (*SplitRequest) XXX_Marshal

func (m *SplitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SplitRequest) XXX_Merge

func (m *SplitRequest) XXX_Merge(src proto.Message)

func (*SplitRequest) XXX_Size

func (m *SplitRequest) XXX_Size() int

func (*SplitRequest) XXX_Unmarshal

func (m *SplitRequest) XXX_Unmarshal(b []byte) error

type SplitStrategy

type SplitStrategy int32

切割策略

const (
	SplitStrategy_SIZE SplitStrategy = 0
	SplitStrategy_TIME SplitStrategy = 1
)

func (SplitStrategy) EnumDescriptor

func (SplitStrategy) EnumDescriptor() ([]byte, []int)

func (SplitStrategy) String

func (x SplitStrategy) String() string

type Status

type Status struct {
	// 状态码,0代表正常
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// 信息, 状态码等于0时为空
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

状态

func (*Status) Descriptor

func (*Status) Descriptor() ([]byte, []int)

func (*Status) GetCode

func (m *Status) GetCode() int32

func (*Status) GetMessage

func (m *Status) GetMessage() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) Reset

func (m *Status) Reset()

func (*Status) String

func (m *Status) String() string

func (*Status) XXX_DiscardUnknown

func (m *Status) XXX_DiscardUnknown()

func (*Status) XXX_Marshal

func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Status) XXX_Merge

func (m *Status) XXX_Merge(src proto.Message)

func (*Status) XXX_Size

func (m *Status) XXX_Size() int

func (*Status) XXX_Unmarshal

func (m *Status) XXX_Unmarshal(b []byte) error

type TaskHandler

type TaskHandler interface {
	// 查询
	Query(context.Context, *QueryRequest, *QueryResponse) error
	// 取消
	Cancel(context.Context, *CancelRequest, *CancelResponse) error
}

type TaskService

type TaskService interface {
	// 查询
	Query(ctx context.Context, in *QueryRequest, opts ...client.CallOption) (*QueryResponse, error)
	// 取消
	Cancel(ctx context.Context, in *CancelRequest, opts ...client.CallOption) (*CancelResponse, error)
}

func NewTaskService

func NewTaskService(name string, c client.Client) TaskService

Jump to

Keyboard shortcuts

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