scalable-syslog: code.cloudfoundry.org/scalable-syslog/scheduler/internal/ingress Index | Files

package ingress

import "code.cloudfoundry.org/scalable-syslog/scheduler/internal/ingress"

Index

Package Files

api_client.go binding_fetcher.go blacklist_ranges.go doc.go filtered_binding_fetcher.go

type APIClient Uses

type APIClient struct {
    Client    *http.Client
    Addr      string
    BatchSize int
}

func (APIClient) Get Uses

func (w APIClient) Get(nextID int) (*http.Response, error)

type BindingFetcher Uses

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

BindingFetcher uses a Getter to fetch and decode Bindings

func NewBindingFetcher Uses

func NewBindingFetcher(g Getter) *BindingFetcher

NewBindingFetcher returns a new BindingFetcher

func (*BindingFetcher) FetchBindings Uses

func (f *BindingFetcher) FetchBindings() ([]v1.Binding, error)

FetchBindings reaches out to the syslog drain binding provider via the Getter and decodes the response. If it does not get a 200, it returns an error.

type BindingReader Uses

type BindingReader interface {
    FetchBindings() (appBindings []v1.Binding, err error)
}

type BlacklistRange Uses

type BlacklistRange struct {
    Start string
    End   string
}

type BlacklistRanges Uses

type BlacklistRanges struct {
    Ranges []BlacklistRange
}

func NewBlacklistRanges Uses

func NewBlacklistRanges(ranges ...BlacklistRange) (*BlacklistRanges, error)

func (*BlacklistRanges) CheckBlacklist Uses

func (i *BlacklistRanges) CheckBlacklist(ip net.IP) error

func (*BlacklistRanges) ParseHost Uses

func (i *BlacklistRanges) ParseHost(drainURL string) (string, string, error)

func (*BlacklistRanges) ResolveAddr Uses

func (i *BlacklistRanges) ResolveAddr(host string) (net.IP, error)

func (*BlacklistRanges) UnmarshalEnv Uses

func (i *BlacklistRanges) UnmarshalEnv(v string) error

UnmarshalEnv implements envstruct.Unmarshaller. Example input: 10.0.0.5-10.0.0.9,123.4.5.6-123.4.5.7

type FilteredBindingFetcher Uses

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

func NewFilteredBindingFetcher Uses

func NewFilteredBindingFetcher(c IPChecker, b BindingReader, lc LogClient) *FilteredBindingFetcher

func (*FilteredBindingFetcher) FetchBindings Uses

func (f *FilteredBindingFetcher) FetchBindings() ([]v1.Binding, int, error)

type Getter Uses

type Getter interface {
    Get(nextID int) (resp *http.Response, err error)
}

Getter is configured to fetch HTTP responses

type IPChecker Uses

type IPChecker interface {
    ParseHost(url string) (string, string, error)
    ResolveAddr(host string) (net.IP, error)
    CheckBlacklist(ip net.IP) error
}

type LogClient Uses

type LogClient interface {
    EmitLog(message string, opts ...loggregator.EmitLogOption)
}

LogClient is used to emit logs about an applications syslog drain.

Package ingress imports 13 packages (graph) and is imported by 2 packages. Updated 2018-08-13. Refresh now. Tools for package owners.