Skip to content

Repository files navigation

Airflow Go client

Go Airflow OpenAPI client generated from openapi spec.

Install

go get github.com/apache/airflow-client-go/airflow@latest

Usage

package main
import (
"context""fmt""github.com/apache/airflow-client-go/airflow"
)
funcmain() {
conf:=airflow.NewConfiguration()
conf.Host="localhost:8080"conf.Scheme="http"cli:=airflow.NewAPIClient(conf)
cred:= airflow.BasicAuth{
UserName: "username",
Password: "password",
}
ctx:=context.WithValue(context.Background(), airflow.ContextBasicAuth, cred)
variable, _, err:=cli.VariableApi.GetVariable(ctx, "foo").Execute()
iferr!=nil {
fmt.Println(err)
} else {
fmt.Println(variable)
}
}

See README for full client API documentation.

About

Apache Airflow - OpenApi Client for Go

Topics

Resources

Code of conduct

Security policy

Stars

220 stars

Watchers

22 watching

Forks

Releases

Packages

Used by

Contributors

Languages