api

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Prefix            = util.PaddleflowRouterPrefix + util.PaddleflowRouterVersionV1
	LoginApi          = Prefix + "/login"
	GetFsApi          = Prefix + "/fs"
	GetLinksApis      = Prefix + "/link"
	FsCacheConfig     = Prefix + "/fsCache"
	FsMount           = Prefix + "/fsMount"
	CacheReportConfig = Prefix + "/fsCache/report"

	KeyUsername   = "username"
	KeyFsName     = "fsName"
	KeyClusterID  = "clusterID"
	KeyNodeName   = "nodename"
	KeyMountPoint = "mountpoint"
)

Variables

This section is empty.

Functions

func CacheReportRequest

func CacheReportRequest(req CacheReportParams, c *core.PaddleFlowClient) error

func FsMountCreate

func FsMountCreate(req CreateMountRequest, c *core.PaddleFlowClient) error

func FsMountDelete

func FsMountDelete(req DeleteMountRequest, c *core.PaddleFlowClient) error

Types

type CacheReportParams

type CacheReportParams struct {
	FsParams
	ClusterID string `json:"clusterID"`
	CacheDir  string `json:"cacheDir"`
	NodeName  string `json:"nodename"`
	UsedSize  int    `json:"usedsize"`
}

type CreateMountRequest

type CreateMountRequest struct {
	ClusterID  string `json:"clusterID"`
	MountPoint string `json:"mountPoint" validate:"required"`
	NodeName   string `json:"nodename" validate:"required"`
	FsParams
}

type DeleteMountRequest

type DeleteMountRequest struct {
	FsParams
	ClusterID  string `json:"clusterID"`
	MountPoint string `json:"mountPoint" validate:"required"`
	NodeName   string `json:"nodename" validate:"required"`
}

type FsCacheResponse

type FsCacheResponse struct {
	CacheDir            string                 `json:"cacheDir"`
	Quota               int                    `json:"quota"`
	MetaDriver          string                 `json:"metaDriver"`
	BlockSize           int                    `json:"blockSize"`
	Debug               bool                   `json:"debug"`
	NodeAffinity        map[string]interface{} `json:"nodeAffinity"`
	NodeTaintToleration map[string]interface{} `json:"nodeTaintToleration"`
	ExtraConfig         map[string]string      `json:"extraConfig"`
	FsName              string                 `json:"fsName"`
	Username            string                 `json:"username"`
	CreateTime          string                 `json:"createTime"`
	UpdateTime          string                 `json:"updateTime,omitempty"`
}

func FsCacheRequest

func FsCacheRequest(params FsParams, c *core.PaddleFlowClient) (*FsCacheResponse, error)

type FsParams

type FsParams struct {
	FsName   string `json:"fsName"`
	UserName string `json:"username"`
	Token    string
}

type FsResponse

type FsResponse struct {
	Id            string            `json:"id"`
	Name          string            `json:"name"`
	ServerAddress string            `json:"serverAddress"`
	Type          string            `json:"type"`
	SubPath       string            `json:"subPath"`
	Username      string            `json:"username"`
	Properties    map[string]string `json:"properties"`
}

func FsRequest

func FsRequest(params FsParams, c *core.PaddleFlowClient) (*FsResponse, error)

type LinkResponse

type LinkResponse struct {
	FsName        string            `json:"fsName"`
	FsPath        string            `json:"fsPath"`
	ServerAddress string            `json:"serverAddress"`
	Type          string            `json:"type"`
	Username      string            `json:"username"`
	SubPath       string            `json:"subPath"`
	Properties    map[string]string `json:"properties"`
}

type LinksParams

type LinksParams struct {
	Marker  string `json:"marker"`
	MaxKeys int32  `json:"maxKeys"`
	FsPath  string `json:"fsPath"`
	FsParams
}

type LinksResponse

type LinksResponse struct {
	Marker     string          `json:"marker"`
	Truncated  bool            `json:"truncated"`
	NextMarker string          `json:"nextMarker"`
	LinkList   []*LinkResponse `json:"linkList"`
}

func LinksRequest

func LinksRequest(params LinksParams, c *core.PaddleFlowClient) (*LinksResponse, error)

type ListMountRequest

type ListMountRequest struct {
	FsParams
	ClusterID string `json:"clusterID"`
	NodeName  string `json:"nodename" validate:"required"`
	Marker    string `json:"marker"`
	MaxKeys   int32  `json:"maxKeys"`
}

type ListMountResponse

type ListMountResponse struct {
	Marker     string           `json:"marker"`
	Truncated  bool             `json:"truncated"`
	NextMarker string           `json:"nextMarker"`
	MountList  []*MountResponse `json:"mountList"`
}

type LoginParams

type LoginParams struct {
	UserName string `json:"username"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Authorization string `json:"authorization"`
}

func LoginRequest

func LoginRequest(params LoginParams, c *core.PaddleFlowClient) (*LoginResponse, error)

type MountResponse

type MountResponse struct {
	MountID    string `json:"mountID"`
	FsID       string `json:"fsID"`
	MountPoint string `json:"mountpoint"`
	NodeName   string `json:"nodename"`
	ClusterID  string `json:"clusterID"`
}

Jump to

Keyboard shortcuts

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