monitor_proto

package
v0.0.0-...-9be813a Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package monitor_proto is a generated protocol buffer package.

Monitor Service

The Key Transparency monitor server service consists of APIs to fetch monitor results queried using the mutations API.

It is generated from these files:

monitor/v1/monitor_proto/monitor.proto

It has these top-level messages:

GetStateRequest
State

Package monitor_proto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMonitorHandler

func RegisterMonitorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMonitorHandler registers the http handlers for service Monitor to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMonitorHandlerClient

func RegisterMonitorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MonitorClient) error

RegisterMonitorHandler registers the http handlers for service Monitor to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MonitorClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MonitorClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MonitorClient" to call the correct interceptors.

func RegisterMonitorHandlerFromEndpoint

func RegisterMonitorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMonitorHandlerFromEndpoint is same as RegisterMonitorHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMonitorServer

func RegisterMonitorServer(s *grpc.Server, srv MonitorServer)

Types

type GetStateRequest

type GetStateRequest struct {
	// kt_url is the URL of the keytransparency server for which the monitoring
	// result will be returned.
	KtUrl string `protobuf:"bytes,2,opt,name=kt_url,json=ktUrl" json:"kt_url,omitempty"`
	// domain_id identifies the merkle tree being monitored.
	DomainId string `protobuf:"bytes,3,opt,name=domain_id,json=domainId" json:"domain_id,omitempty"`
	// epoch specifies the revision for which the monitoring results will
	// be returned (epochs start at 0).
	Epoch int64 `protobuf:"varint,1,opt,name=epoch" json:"epoch,omitempty"`
}

GetStateRequest requests the verification state of a keytransparency domain for a particular point in time.

func (*GetStateRequest) Descriptor

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

func (*GetStateRequest) GetDomainId

func (m *GetStateRequest) GetDomainId() string

func (*GetStateRequest) GetEpoch

func (m *GetStateRequest) GetEpoch() int64

func (*GetStateRequest) GetKtUrl

func (m *GetStateRequest) GetKtUrl() string

func (*GetStateRequest) ProtoMessage

func (*GetStateRequest) ProtoMessage()

func (*GetStateRequest) Reset

func (m *GetStateRequest) Reset()

func (*GetStateRequest) String

func (m *GetStateRequest) String() string

type MonitorClient

type MonitorClient interface {
	// GetSignedMapRoot returns the latest valid signed map root the monitor
	// observed. Additionally, the response contains extra data necessary to
	// reproduce errors on failure.
	//
	// Returns the signed map root for the latest epoch the monitor observed. If
	// the monitor could not reconstruct the map root given the set of mutations
	// from the previous to the current epoch it won't sign the map root and
	// additional data will be provided to reproduce the failure.
	GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*State, error)
	// GetSignedMapRootByRevision returns the monitor's result for a specific map
	// revision.
	//
	// Returns the signed map root for the specified epoch the monitor observed.
	// If the monitor could not reconstruct the map root given the set of
	// mutations from the previous to the current epoch it won't sign the map root
	// and additional data will be provided to reproduce the failure.
	GetStateByRevision(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*State, error)
}

func NewMonitorClient

func NewMonitorClient(cc *grpc.ClientConn) MonitorClient

type MonitorServer

type MonitorServer interface {
	// GetSignedMapRoot returns the latest valid signed map root the monitor
	// observed. Additionally, the response contains extra data necessary to
	// reproduce errors on failure.
	//
	// Returns the signed map root for the latest epoch the monitor observed. If
	// the monitor could not reconstruct the map root given the set of mutations
	// from the previous to the current epoch it won't sign the map root and
	// additional data will be provided to reproduce the failure.
	GetState(context.Context, *GetStateRequest) (*State, error)
	// GetSignedMapRootByRevision returns the monitor's result for a specific map
	// revision.
	//
	// Returns the signed map root for the specified epoch the monitor observed.
	// If the monitor could not reconstruct the map root given the set of
	// mutations from the previous to the current epoch it won't sign the map root
	// and additional data will be provided to reproduce the failure.
	GetStateByRevision(context.Context, *GetStateRequest) (*State, error)
}

type State

type State struct {
	// smr contains the map root for the sparse Merkle Tree signed with the
	// monitor's key on success. If the checks were not successful the
	// smr will be empty. The epochs are encoded into the smr map_revision.
	Smr *trillian.SignedMapRoot `protobuf:"bytes,1,opt,name=smr" json:"smr,omitempty"`
	// seen_time contains the time when this particular signed map root was
	// retrieved and processed.
	SeenTime *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=seen_time,json=seenTime" json:"seen_time,omitempty"`
	// errors contains a list of errors representing the verification checks
	// that failed while monitoring the key-transparency server.
	Errors []*google_rpc.Status `protobuf:"bytes,3,rep,name=errors" json:"errors,omitempty"`
}

State represents the monitor's evaluation of a Key Transparency domain at a particular epoch.

func (*State) Descriptor

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

func (*State) GetErrors

func (m *State) GetErrors() []*google_rpc.Status

func (*State) GetSeenTime

func (m *State) GetSeenTime() *google_protobuf1.Timestamp

func (*State) GetSmr

func (m *State) GetSmr() *trillian.SignedMapRoot

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) Reset

func (m *State) Reset()

func (*State) String

func (m *State) String() string

Jump to

Keyboard shortcuts

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