commands

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2017 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Root

func Root(c config.Config) *cobra.Command

Root configure and return root command

func WithWalletPerRPCCredentials

func WithWalletPerRPCCredentials() grpc.DialOption

Types

type DealsInteractor

type DealsInteractor interface {
	List(from string, status pb.DealStatus) ([]*pb.Deal, error)
	Status(id string) (*pb.Deal, error)
	FinishDeal(id string) error
}

func NewDealsInteractor

func NewDealsInteractor(addr string, timeout time.Duration) (DealsInteractor, error)

type NodeHubInteractor

type NodeHubInteractor interface {
	Status() (*pb.HubStatusReply, error)

	WorkersList() (*pb.ListReply, error)
	WorkerStatus(id string) (*pb.InfoReply, error)

	GetRegisteredWorkers() (*pb.GetRegisteredWorkersReply, error)
	RegisterWorker(id string) (*pb.Empty, error)
	DeregisterWorker(id string) (*pb.Empty, error)

	DevicesList() (*pb.DevicesReply, error)
	GetDeviceProperties(id string) (*pb.GetDevicePropertiesReply, error)
	SetDeviceProperties(ID string, properties map[string]float64) (*pb.Empty, error)

	GetAskPlans() (*pb.SlotsReply, error)
	CreateAskPlan(req *pb.InsertSlotRequest) (*pb.ID, error)
	RemoveAskPlan(id string) (*pb.Empty, error)

	TaskList() (*pb.TaskListReply, error)
	TaskStatus(id string) (*pb.TaskStatusReply, error)
}

func NewHubInteractor

func NewHubInteractor(addr string, timeout time.Duration) (NodeHubInteractor, error)

type NodeMarketInteractor

type NodeMarketInteractor interface {
	GetOrders(slot *structs.Slot, orderType pb.OrderType, count uint64) ([]*pb.Order, error)
	GetProcessing() (*pb.GetProcessingReply, error)
	GetOrderByID(id string) (*pb.Order, error)
	CreateOrder(order *pb.Order) (*pb.Order, error)
	CancelOrder(id string) error
}

func NewMarketInteractor

func NewMarketInteractor(addr string, timeout time.Duration) (NodeMarketInteractor, error)

type TasksInteractor

type TasksInteractor interface {
	List(hubAddr string) (*pb.TaskListReply, error)
	ImagePush(ctx context.Context) (pb.Hub_PushTaskClient, error)
	Start(req *pb.HubStartTaskRequest) (*pb.HubStartTaskReply, error)
	Status(id, hub string) (*pb.TaskStatusReply, error)
	Logs(ctx context.Context, req *pb.TaskLogsRequest) (pb.TaskManagement_LogsClient, error)
	Stop(id, hub string) (*pb.Empty, error)
	ImagePull(dealID, taskID string) (pb.Hub_PullTaskClient, error)
}

func NewTasksInteractor

func NewTasksInteractor(addr string, timeout time.Duration, opts ...grpc.DialOption) (TasksInteractor, error)

Jump to

Keyboard shortcuts

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