Documentation ¶
Index ¶
- func NewAdminClient(c *yt.Config) (yt.AdminClient, error)
- func NewClient(c *yt.Config) (yt.Client, error)
- func NewCypressClient(c *yt.Config) (yt.CypressClient, error)
- func NewLowLevelSchedulerClient(c *yt.Config) (yt.LowLevelSchedulerClient, error)
- func NewLowLevelTxClient(c *yt.Config) (yt.LowLevelTxClient, error)
- func NewTestClient(t testing.TB, c *yt.Config) (yt.Client, error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdminClient ¶
func NewAdminClient(c *yt.Config) (yt.AdminClient, error)
NewAdminClient creates new admin client from config.
func NewClient ¶
NewClient creates new client from config.
Note! Table and File clients have stub implementations. If you need one of those use http client instead.
func NewCypressClient ¶
func NewCypressClient(c *yt.Config) (yt.CypressClient, error)
NewCypressClient creates new cypress client from config.
Example ¶
package main import ( "context" "fmt" "time" "go.ytsaurus.tech/yt/go/ypath" "go.ytsaurus.tech/yt/go/yt" "go.ytsaurus.tech/yt/go/yt/ytrpc" "go.ytsaurus.tech/yt/go/ytlog" ) func main() { yc, err := ytrpc.NewCypressClient(&yt.Config{ Proxy: "hume", ReadTokenFromFile: true, Logger: ytlog.Must(), }) if err != nil { panic(err) } ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) defer cancel() ok, err := yc.NodeExists(ctx, ypath.Path("//home"), nil) if err != nil { panic(err) } fmt.Printf("Node exists? %v\n", ok) }
Output:
func NewLowLevelSchedulerClient ¶
func NewLowLevelSchedulerClient(c *yt.Config) (yt.LowLevelSchedulerClient, error)
NewLowLevelSchedulerClient creates new stateless scheduler client from config.
Clients should rarely use it directly.
Note! RPC streaming call GetJobStderr is not implemented yet.
func NewLowLevelTxClient ¶
func NewLowLevelTxClient(c *yt.Config) (yt.LowLevelTxClient, error)
NewLowLevelTxClient creates new stateless transaction client from config.
Clients should rarely use it directly.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.