Documentation ¶
Index ¶
- Constants
- type HostServiceImpl
- func (i *HostServiceImpl) Config()
- func (i *HostServiceImpl) Create(ctx context.Context, ins *host.Host) (*host.Host, error)
- func (i *HostServiceImpl) Delete(ctx context.Context, req *host.DeleteHostRequest) (*host.Host, error)
- func (i *HostServiceImpl) Describe(ctx context.Context, req *host.DescribeHostRequest) (*host.Host, error)
- func (i *HostServiceImpl) Name() string
- func (i *HostServiceImpl) Query(ctx context.Context, req *host.QueryHostRequest) (*host.HostSet, error)
- func (i *HostServiceImpl) ServiceName() string
- func (i *HostServiceImpl) Update(ctx context.Context, req *host.UpdateHostRequest) (*host.Host, error)
Constants ¶
View Source
const ( InsertResourceSQL = `` /* 223-byte string literal not displayed */ // INSERT INTO `host` ( resource_id, cpu, memory, gpu_amount, gpu_spec, os_type, os_name, serial_number ) // VALUES // ( "111", 1, 2048, 1, 'n', 'linux', 'centos8', '00000' ); InsertDescribeSQL = `` /* 135-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostServiceImpl ¶
type HostServiceImpl struct {
// contains filtered or unexported fields
}
HostServiceImpl 用这个结构体去实现接口下的方法 对于service的实现类
func NewHostServiceImp ¶
func NewHostServiceImp() *HostServiceImpl
NewHostServiceImp 保证调用该函数之前,全局conf已经初始化
func (*HostServiceImpl) Delete ¶
func (i *HostServiceImpl) Delete(ctx context.Context, req *host.DeleteHostRequest) (*host.Host, error)
func (*HostServiceImpl) Describe ¶
func (i *HostServiceImpl) Describe(ctx context.Context, req *host.DescribeHostRequest) (*host.Host, error)
Describe 查询主机详情(不能为空,否则字段转化会报NULL的转型问题)
func (*HostServiceImpl) Name ¶
func (i *HostServiceImpl) Name() string
func (*HostServiceImpl) Query ¶
func (i *HostServiceImpl) Query(ctx context.Context, req *host.QueryHostRequest) (*host.HostSet, error)
func (*HostServiceImpl) ServiceName ¶
func (i *HostServiceImpl) ServiceName() string
func (*HostServiceImpl) Update ¶
func (i *HostServiceImpl) Update(ctx context.Context, req *host.UpdateHostRequest) (*host.Host, error)
Click to show internal directories.
Click to hide internal directories.