file

package
v0.0.0-...-b28dce8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package file is a generated protocol buffer package.

It is generated from these files:

github.com/google/cloudprober/surfacers/file/config.proto

It has these top-level messages:

SurfacerConf

Package file implements "file" surfacer. This surfacer type is in experimental phase right now.

Index

Constants

View Source
const Default_SurfacerConf_Prefix string = "cloudprober"

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSurfacer

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

FileSurfacer structures for writing onto a GCE instance's serial port. Keeps track of an output file which the incoming data is serialized onto (one entry per line).

func New

func New(config *SurfacerConf, l *logger.Logger) (*FileSurfacer, error)

New initializes a FileSurfacer for serializing data into a file (usually set as a GCE instance's serial port). This Surfacer does not utilize the Google cloud logger because it is unlikely to fail reportably after the call to New.

func (*FileSurfacer) Write

func (s *FileSurfacer) Write(ctx context.Context, em *metrics.EventMetrics)

Write takes the data to be written to file (usually set as a GCE instance's serial port). This channel is watched by a goroutine that actually writes data to a file.

type SurfacerConf

type SurfacerConf struct {
	// Where to write the results. If left unset, file surfacer writes to the
	// standard output.
	FilePath         *string `protobuf:"bytes,1,opt,name=file_path,json=filePath" json:"file_path,omitempty"`
	Prefix           *string `protobuf:"bytes,2,opt,name=prefix,def=cloudprober" json:"prefix,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*SurfacerConf) Descriptor

func (*SurfacerConf) Descriptor() ([]byte, []int)

func (*SurfacerConf) GetFilePath

func (m *SurfacerConf) GetFilePath() string

func (*SurfacerConf) GetPrefix

func (m *SurfacerConf) GetPrefix() string

func (*SurfacerConf) ProtoMessage

func (*SurfacerConf) ProtoMessage()

func (*SurfacerConf) Reset

func (m *SurfacerConf) Reset()

func (*SurfacerConf) String

func (m *SurfacerConf) String() string

Jump to

Keyboard shortcuts

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