juju: github.com/juju/juju/api/logfwd Index | Files

package logfwd

import "github.com/juju/juju/api/logfwd"

Index

Package Files

lastsent.go

type FacadeCaller Uses

type FacadeCaller interface {
    // FacadeCall is the same method as on base.FacadeCaller.
    FacadeCall(request string, params, response interface{}) error
}

FacadeCaller provides the functionality to call methods on a facade.

type LastSentClient Uses

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

LastSentClient exposes the "last sent" methods of the LogForwarding API facade.

func NewLastSentClient Uses

func NewLastSentClient(newFacadeCaller func(string) FacadeCaller) *LastSentClient

NewLastSentClient creates a new API client for the facade.

func (LastSentClient) GetLastSent Uses

func (c LastSentClient) GetLastSent(ids []LastSentID) ([]LastSentResult, error)

GetLastSent makes a "GetLastSent" call on the facade and returns the results in the same order.

func (LastSentClient) SetLastSent Uses

func (c LastSentClient) SetLastSent(reqs []LastSentInfo) ([]LastSentResult, error)

SetLastSent makes a "SetLastSent" call on the facade and returns the results in the same order.

type LastSentID Uses

type LastSentID struct {
    // ModelTag identifies the model associated with the log record.
    Model names.ModelTag

    // Sink is the name of the log forwarding target to which a log
    // record was last sent.
    Sink string
}

LastSentID is the data that identifies a log forwarding "last sent" value. The controller has a mapping from a set of IDs to a record ID (for each ID). The record ID corresponds to the last log record that the specific log forwarding machinery sent to the identified "sink" (for a given model).

type LastSentInfo Uses

type LastSentInfo struct {
    LastSentID

    // RecordID identifies the last log record that was forwarded
    // for a given model and sink.
    RecordID int64

    // RecordTimestamp identifies the last log record that was forwarded
    // for a given model and sink.
    RecordTimestamp time.Time
}

LastSentInfo holds the info about a "last sent" value.

type LastSentResult Uses

type LastSentResult struct {
    LastSentInfo

    // Error holds the error, if any, that resulted while handling the
    // request for the ID.
    Error error
}

LastSentResult holds a single result from a bulk API call.

Package logfwd imports 5 packages (graph) and is imported by 16 packages. Updated 2019-08-25. Refresh now. Tools for package owners.