client

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomCredentials

type CustomCredentials struct {
	oauth2.TokenSource
	*transport.ImpersonationConfig
}

CustomCredentials supplies PerRPCCredentials from a Token Source and Impersonation config.

func (*CustomCredentials) GetRequestMetadata

func (cc *CustomCredentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

GetRequestMetadata gets the request metadata as a map from a Custom.

func (*CustomCredentials) RequireTransportSecurity

func (cc *CustomCredentials) RequireTransportSecurity() bool

RequireTransportSecurity indicates whether the credentials requires transport security.

type GRPCClient

type GRPCClient interface {
	resultsv1alpha2.LogsClient
	resultsv1alpha2.ResultsClient
}

GRPCClient represents GRPC API client to connect to Tekton results api server.

func NewGRPCClient

func NewGRPCClient(serverAddress string, opts ...grpc.DialOption) (GRPCClient, error)

NewGRPCClient creates a new gRPC client.

type RESTClient

type RESTClient interface {
	GetResult(ctx context.Context, in *v1alpha2.GetResultRequest) (*v1alpha2.Result, error)
	ListResults(ctx context.Context, in *v1alpha2.ListResultsRequest) (*v1alpha2.ListResultsResponse, error)
	DeleteResult(ctx context.Context, in *v1alpha2.DeleteResultRequest) (*emptypb.Empty, error)
	GetRecord(ctx context.Context, in *v1alpha2.GetRecordRequest) (*v1alpha2.Record, error)
	ListRecords(ctx context.Context, in *v1alpha2.ListRecordsRequest) (*v1alpha2.ListRecordsResponse, error)
	DeleteRecord(ctx context.Context, in *v1alpha2.DeleteRecordRequest) (*emptypb.Empty, error)
}

RESTClient represents rest API client to connect to Tekton results api server.

func NewRESTClient

func NewRESTClient(serverAddress string, opts ...RestOption) (RESTClient, error)

NewRESTClient creates a new REST client.

type RestOption

type RestOption func(client *restClient) error

RestOption is customization of the HTTP Client.

func WithConfig

func WithConfig(config *transport.Config) RestOption

WithConfig allows customization of the HTTP Client.

func WithTimeout

func WithTimeout(duration time.Duration) RestOption

WithTimeout adds universal timeout for all HTTP request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳