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 (m LogEntry) String() string
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
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 (m LogEntryBatch) String() string
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
LoggingClient a client for Logging
type LoggingClient struct { common.BaseClient // contains filtered or unexported fields }
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(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 (client *LoggingClient) ConfigurationProvider() *common.ConfigurationProvider
ConfigurationProvider the ConfigurationProvider used in this client, or null if none set
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.
Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/loggingingestion/PutLogs.go.html to see an example of how to use PutLogs API.
func (client *LoggingClient) SetRegion(region string)
SetRegion overrides the region of this client.
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 (m PutLogsDetails) String() string
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
PutLogsRequest wrapper for the PutLogs operation
Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/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 (request PutLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
BinaryRequestBody implements the OCIRequest interface
func (request PutLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (request PutLogsRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request PutLogsRequest) String() string
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
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 (response PutLogsResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
func (response PutLogsResponse) String() string