...

Package loggingingestion

import "github.com/oracle/oci-go-sdk/loggingingestion"
Overview
Index

Overview ▾

Index ▾

type LogEntry
    func (m LogEntry) String() string
    func (m LogEntry) ValidateEnumValue() (bool, error)
type LogEntryBatch
    func (m LogEntryBatch) String() string
    func (m LogEntryBatch) ValidateEnumValue() (bool, error)
type LoggingClient
    func NewLoggingClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client LoggingClient, err error)
    func NewLoggingClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client LoggingClient, err error)
    func (client *LoggingClient) ConfigurationProvider() *common.ConfigurationProvider
    func (client LoggingClient) PutLogs(ctx context.Context, request PutLogsRequest) (response PutLogsResponse, err error)
    func (client *LoggingClient) SetRegion(region string)
type PutLogsDetails
    func (m PutLogsDetails) String() string
    func (m PutLogsDetails) ValidateEnumValue() (bool, error)
type PutLogsRequest
    func (request PutLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
    func (request PutLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)
    func (request PutLogsRequest) RetryPolicy() *common.RetryPolicy
    func (request PutLogsRequest) String() string
    func (request PutLogsRequest) ValidateEnumValue() (bool, error)
type PutLogsResponse
    func (response PutLogsResponse) HTTPResponse() *http.Response
    func (response PutLogsResponse) String() string

Package files

log_entry.go log_entry_batch.go loggingingestion_logging_client.go put_logs_details.go put_logs_request_response.go

type LogEntry

LogEntry Contains the log content with the associated timestamp and ID. Each entry should be less than 1 MB size.

type LogEntry struct {

    // The log entry content.
    Data *string `mandatory:"true" json:"data"`

    // UUID uniquely representing this logEntry. This is not an OCID related
    // to any oracle resource.
    Id *string `mandatory:"true" json:"id"`

    // Optional. The timestamp associated with the log entry. An RFC3339-formatted date-time string with milliseconds precision.
    // If unspecified, defaults to PutLogsDetails.defaultlogentrytime.
    Time *common.SDKTime `mandatory:"false" json:"time"`
}

func (LogEntry) String

func (m LogEntry) String() string

func (LogEntry) ValidateEnumValue

func (m LogEntry) ValidateEnumValue() (bool, error)

ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly

type LogEntryBatch

LogEntryBatch A single batch of Log Entries.

type LogEntryBatch struct {

    // List of data entries.
    Entries []LogEntry `mandatory:"true" json:"entries"`

    // Source of the logs that generated the message. This could be the
    // instance name, hostname, or the source used to read the event. For example, "ServerA".
    Source *string `mandatory:"true" json:"source"`

    // This field signifies the type of logs being ingested.
    // For example: ServerA.requestLogs.
    Type *string `mandatory:"true" json:"type"`

    // The timestamp for all log entries in this batch. This can be
    // considered as the default timestamp for each entry, unless it is
    // overwritten by the entry time. An RFC3339-formatted date-time string
    // with milliseconds precision.
    Defaultlogentrytime *common.SDKTime `mandatory:"true" json:"defaultlogentrytime"`

    // This optional field is useful for specifying the specific sub-resource
    // or input file used to read the event.
    // For example: "/var/log/application.log".
    Subject *string `mandatory:"false" json:"subject"`
}

func (LogEntryBatch) String

func (m LogEntryBatch) String() string

func (LogEntryBatch) ValidateEnumValue

func (m LogEntryBatch) ValidateEnumValue() (bool, error)

ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly

type LoggingClient

LoggingClient a client for Logging

type LoggingClient struct {
    common.BaseClient
    // contains filtered or unexported fields
}

func NewLoggingClientWithConfigurationProvider

func NewLoggingClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client LoggingClient, err error)

NewLoggingClientWithConfigurationProvider Creates a new default Logging client with the given configuration provider. the configuration provider will be used for the default signer as well as reading the region

func NewLoggingClientWithOboToken

func NewLoggingClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client LoggingClient, err error)

NewLoggingClientWithOboToken Creates a new default Logging client with the given configuration provider. The obotoken will be added to default headers and signed; the configuration provider will be used for the signer

as well as reading the region

func (*LoggingClient) ConfigurationProvider

func (client *LoggingClient) ConfigurationProvider() *common.ConfigurationProvider

ConfigurationProvider the ConfigurationProvider used in this client, or null if none set

func (LoggingClient) PutLogs

func (client LoggingClient) PutLogs(ctx context.Context, request PutLogsRequest) (response PutLogsResponse, err error)

PutLogs This API allows ingesting logs associated with a logId. A success response implies the data has been accepted.

# See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/65.63.2/loggingingestion/PutLogs.go.html to see an example of how to use PutLogs API.

func (*LoggingClient) SetRegion

func (client *LoggingClient) SetRegion(region string)

SetRegion overrides the region of this client.

type PutLogsDetails

PutLogsDetails The request body for the PutLogs request.

type PutLogsDetails struct {

    // Required for identifying the version of the data format being used.
    // Permitted values include: "1.0"
    Specversion *string `mandatory:"true" json:"specversion"`

    // List of log-batches. Each batch has a single source, type and subject.
    LogEntryBatches []LogEntryBatch `mandatory:"true" json:"logEntryBatches"`
}

func (PutLogsDetails) String

func (m PutLogsDetails) String() string

func (PutLogsDetails) ValidateEnumValue

func (m PutLogsDetails) ValidateEnumValue() (bool, error)

ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly

type PutLogsRequest

PutLogsRequest wrapper for the PutLogs operation

# See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/65.63.2/loggingingestion/PutLogs.go.html to see an example of how to use PutLogsRequest.

type PutLogsRequest struct {

    // OCID of a log to work with.
    LogId *string `mandatory:"true" contributesTo:"path" name:"logId"`

    // The logs to emit.
    PutLogsDetails `contributesTo:"body"`

    // Effective timestamp, for when the agent started processing the log
    // segment being sent. An RFC3339-formatted date-time string with milliseconds precision.
    TimestampOpcAgentProcessing *common.SDKTime `mandatory:"false" contributesTo:"header" name:"timestamp-opc-agent-processing"`

    // Version of the agent sending the request.
    OpcAgentVersion *string `mandatory:"false" contributesTo:"header" name:"opc-agent-version"`

    // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
    // a particular request, please provide the request ID.
    OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

    // Metadata about the request. This information will not be transmitted to the service, but
    // represents information that the SDK will consume to drive retry behavior.
    RequestMetadata common.RequestMetadata
}

func (PutLogsRequest) BinaryRequestBody

func (request PutLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)

BinaryRequestBody implements the OCIRequest interface

func (PutLogsRequest) HTTPRequest

func (request PutLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (PutLogsRequest) RetryPolicy

func (request PutLogsRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (PutLogsRequest) String

func (request PutLogsRequest) String() string

func (PutLogsRequest) ValidateEnumValue

func (request PutLogsRequest) ValidateEnumValue() (bool, error)

ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly

type PutLogsResponse

PutLogsResponse wrapper for the PutLogs operation

type PutLogsResponse struct {

    // The underlying http response
    RawResponse *http.Response

    // Unique Oracle-assigned identifier for the request. If you need to contact
    // Oracle about a particular request, please provide the request ID.
    OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}

func (PutLogsResponse) HTTPResponse

func (response PutLogsResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (PutLogsResponse) String

func (response PutLogsResponse) String() string