scraper

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory

type ClientFactory struct{}

ClientFactory generates DiscoveryClients for a pod

func (*ClientFactory) Client

func (f *ClientFactory) Client(ctx context.Context, url string) (DiscoveryClient, func() error, error)

Client gets a Discovery client for an address

type DiscoveryClient

type DiscoveryClient interface {
	GetServiceInfo(context.Context, *discoveryv1.GetServiceInfoRequest, ...grpc.CallOption) (*discoveryv1.GetServiceInfoResponse, error)
}

DiscoveryClient is the kafmesh discovery grpc client

type DiscoveryFactory

type DiscoveryFactory interface {
	Client(context.Context, string) (DiscoveryClient, func() error, error)
}

DiscoveryFactory creates DiscoveryClients for pods

type Job

type Job struct {
	// contains filtered or unexported fields
}

Job runs scrape jobs against pods running in the cluster

func NewJob

func NewJob(podLister PodLister, discoveryFactory DiscoveryFactory) *Job

NewJob creates a new job

func (*Job) GetKafmeshPods added in v0.9.0

func (j *Job) GetKafmeshPods(ctx context.Context) ([]v1.Pod, error)

GetKafmeshPods gets all kafmesh pods running in the cluster

func (*Job) ScrapePod added in v0.9.0

func (j *Job) ScrapePod(ctx context.Context, pod v1.Pod) (*discoveryv1.Service, error)

ScrapePod gets the kafmesh service info from the pod

type PodLister

type PodLister interface {
	List(context.Context, metav1.ListOptions) (*v1.PodList, error)
}

PodLister gets the pods running in the cluster

Jump to

Keyboard shortcuts

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