// Code generated by protoc-gen-go. // source: gobgp.proto // DO NOT EDIT! /* Package api is a generated protocol buffer package. It is generated from these files: gobgp.proto It has these top-level messages: Error Arguments ModPathArguments PolicyArguments MrtArguments ModVrfArguments GracefulRestartTuple GracefulRestart Capability Path Destination PeerConf PeerInfo Peer Prefix PrefixSet Neighbor NeighborSet AsPathLength AsPathSet CommunitySet ExtCommunitySet Conditions CommunityAction AsPrependAction Actions Statement PolicyDefinition ApplyPolicy MrtMessage ROA Vrf */ package api import proto "github.com/golang/protobuf/proto" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal type Resource int32 const ( Resource_GLOBAL Resource = 0 Resource_LOCAL Resource = 1 Resource_ADJ_IN Resource = 2 Resource_ADJ_OUT Resource = 3 Resource_POLICY_PREFIX Resource = 4 Resource_POLICY_NEIGHBOR Resource = 5 Resource_POLICY_ASPATH Resource = 6 Resource_POLICY_COMMUNITY Resource = 7 Resource_POLICY_ROUTEPOLICY Resource = 8 Resource_POLICY_EXTCOMMUNITY Resource = 9 Resource_VRF Resource = 10 ) var Resource_name = map[int32]string{ 0: "GLOBAL", 1: "LOCAL", 2: "ADJ_IN", 3: "ADJ_OUT", 4: "POLICY_PREFIX", 5: "POLICY_NEIGHBOR", 6: "POLICY_ASPATH", 7: "POLICY_COMMUNITY", 8: "POLICY_ROUTEPOLICY", 9: "POLICY_EXTCOMMUNITY", 10: "VRF", } var Resource_value = map[string]int32{ "GLOBAL": 0, "LOCAL": 1, "ADJ_IN": 2, "ADJ_OUT": 3, "POLICY_PREFIX": 4, "POLICY_NEIGHBOR": 5, "POLICY_ASPATH": 6, "POLICY_COMMUNITY": 7, "POLICY_ROUTEPOLICY": 8, "POLICY_EXTCOMMUNITY": 9, "VRF": 10, } func (x Resource) String() string { return proto.EnumName(Resource_name, int32(x)) } type Operation int32 const ( Operation_ADD Operation = 0 Operation_DEL Operation = 1 Operation_DEL_ALL Operation = 2 ) var Operation_name = map[int32]string{ 0: "ADD", 1: "DEL", 2: "DEL_ALL", } var Operation_value = map[string]int32{ "ADD": 0, "DEL": 1, "DEL_ALL": 2, } func (x Operation) String() string { return proto.EnumName(Operation_name, int32(x)) } type BGP_CAPABILITY int32 const ( BGP_CAPABILITY_UNKNOWN_CAP BGP_CAPABILITY = 0 BGP_CAPABILITY_MULTIPROTOCOL BGP_CAPABILITY = 1 BGP_CAPABILITY_ROUTE_REFRESH BGP_CAPABILITY = 2 BGP_CAPABILITY_CARRYING_LABEL_INFO BGP_CAPABILITY = 4 BGP_CAPABILITY_GRACEFUL_RESTART BGP_CAPABILITY = 64 BGP_CAPABILITY_FOUR_OCTET_AS_NUMBER BGP_CAPABILITY = 65 BGP_CAPABILITY_ENHANCED_ROUTE_REFRESH BGP_CAPABILITY = 70 BGP_CAPABILITY_ROUTE_REFRESH_CISCO BGP_CAPABILITY = 128 ) var BGP_CAPABILITY_name = map[int32]string{ 0: "UNKNOWN_CAP", 1: "MULTIPROTOCOL", 2: "ROUTE_REFRESH", 4: "CARRYING_LABEL_INFO", 64: "GRACEFUL_RESTART", 65: "FOUR_OCTET_AS_NUMBER", 70: "ENHANCED_ROUTE_REFRESH", 128: "ROUTE_REFRESH_CISCO", } var BGP_CAPABILITY_value = map[string]int32{ "UNKNOWN_CAP": 0, "MULTIPROTOCOL": 1, "ROUTE_REFRESH": 2, "CARRYING_LABEL_INFO": 4, "GRACEFUL_RESTART": 64, "FOUR_OCTET_AS_NUMBER": 65, "ENHANCED_ROUTE_REFRESH": 70, "ROUTE_REFRESH_CISCO": 128, } func (x BGP_CAPABILITY) String() string { return proto.EnumName(BGP_CAPABILITY_name, int32(x)) } type Error_ErrorCode int32 const ( Error_SUCCESS Error_ErrorCode = 0 Error_FAIL Error_ErrorCode = 1 ) var Error_ErrorCode_name = map[int32]string{ 0: "SUCCESS", 1: "FAIL", } var Error_ErrorCode_value = map[string]int32{ "SUCCESS": 0, "FAIL": 1, } func (x Error_ErrorCode) String() string { return proto.EnumName(Error_ErrorCode_name, int32(x)) } type Error struct { Code Error_ErrorCode `protobuf:"varint,1,opt,name=code,enum=api.Error_ErrorCode" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"` } func (m *Error) Reset() { *m = Error{} } func (m *Error) String() string { return proto.CompactTextString(m) } func (*Error) ProtoMessage() {} type Arguments struct { Resource Resource `protobuf:"varint,1,opt,name=resource,enum=api.Resource" json:"resource,omitempty"` Rf uint32 `protobuf:"varint,2,opt,name=rf" json:"rf,omitempty"` Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` } func (m *Arguments) Reset() { *m = Arguments{} } func (m *Arguments) String() string { return proto.CompactTextString(m) } func (*Arguments) ProtoMessage() {} type ModPathArguments struct { Resource Resource `protobuf:"varint,1,opt,name=resource,enum=api.Resource" json:"resource,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Path *Path `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` } func (m *ModPathArguments) Reset() { *m = ModPathArguments{} } func (m *ModPathArguments) String() string { return proto.CompactTextString(m) } func (*ModPathArguments) ProtoMessage() {} func (m *ModPathArguments) GetPath() *Path { if m != nil { return m.Path } return nil } type PolicyArguments struct { Resource Resource `protobuf:"varint,1,opt,name=resource,enum=api.Resource" json:"resource,omitempty"` Operation Operation `protobuf:"varint,2,opt,name=operation,enum=api.Operation" json:"operation,omitempty"` NeighborAddress string `protobuf:"bytes,3,opt,name=neighbor_address" json:"neighbor_address,omitempty"` Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` PolicyDefinition *PolicyDefinition `protobuf:"bytes,6,opt,name=policy_definition" json:"policy_definition,omitempty"` ApplyPolicy *ApplyPolicy `protobuf:"bytes,7,opt,name=apply_policy" json:"apply_policy,omitempty"` } func (m *PolicyArguments) Reset() { *m = PolicyArguments{} } func (m *PolicyArguments) String() string { return proto.CompactTextString(m) } func (*PolicyArguments) ProtoMessage() {} func (m *PolicyArguments) GetPolicyDefinition() *PolicyDefinition { if m != nil { return m.PolicyDefinition } return nil } func (m *PolicyArguments) GetApplyPolicy() *ApplyPolicy { if m != nil { return m.ApplyPolicy } return nil } type MrtArguments struct { Resource Resource `protobuf:"varint,1,opt,name=resource,enum=api.Resource" json:"resource,omitempty"` Rf uint32 `protobuf:"varint,2,opt,name=rf" json:"rf,omitempty"` Interval uint64 `protobuf:"varint,3,opt,name=interval" json:"interval,omitempty"` NeighborAddress string `protobuf:"bytes,4,opt,name=neighbor_address" json:"neighbor_address,omitempty"` } func (m *MrtArguments) Reset() { *m = MrtArguments{} } func (m *MrtArguments) String() string { return proto.CompactTextString(m) } func (*MrtArguments) ProtoMessage() {} type ModVrfArguments struct { Operation Operation `protobuf:"varint,1,opt,name=operation,enum=api.Operation" json:"operation,omitempty"` Vrf *Vrf `protobuf:"bytes,2,opt,name=vrf" json:"vrf,omitempty"` } func (m *ModVrfArguments) Reset() { *m = ModVrfArguments{} } func (m *ModVrfArguments) String() string { return proto.CompactTextString(m) } func (*ModVrfArguments) ProtoMessage() {} func (m *ModVrfArguments) GetVrf() *Vrf { if m != nil { return m.Vrf } return nil } type GracefulRestartTuple struct { Rf uint32 `protobuf:"varint,1,opt,name=rf" json:"rf,omitempty"` Flags uint32 `protobuf:"varint,2,opt,name=flags" json:"flags,omitempty"` } func (m *GracefulRestartTuple) Reset() { *m = GracefulRestartTuple{} } func (m *GracefulRestartTuple) String() string { return proto.CompactTextString(m) } func (*GracefulRestartTuple) ProtoMessage() {} type GracefulRestart struct { Flags uint32 `protobuf:"varint,1,opt,name=flags" json:"flags,omitempty"` Time uint32 `protobuf:"varint,2,opt,name=time" json:"time,omitempty"` Tuples []*GracefulRestartTuple `protobuf:"bytes,3,rep,name=tuples" json:"tuples,omitempty"` } func (m *GracefulRestart) Reset() { *m = GracefulRestart{} } func (m *GracefulRestart) String() string { return proto.CompactTextString(m) } func (*GracefulRestart) ProtoMessage() {} func (m *GracefulRestart) GetTuples() []*GracefulRestartTuple { if m != nil { return m.Tuples } return nil } type Capability struct { Code BGP_CAPABILITY `protobuf:"varint,1,opt,name=code,enum=api.BGP_CAPABILITY" json:"code,omitempty"` MultiProtocol uint32 `protobuf:"varint,2,opt,name=multi_protocol" json:"multi_protocol,omitempty"` GracefulRestart *GracefulRestart `protobuf:"bytes,3,opt,name=graceful_restart" json:"graceful_restart,omitempty"` Asn uint32 `protobuf:"varint,4,opt,name=asn" json:"asn,omitempty"` } func (m *Capability) Reset() { *m = Capability{} } func (m *Capability) String() string { return proto.CompactTextString(m) } func (*Capability) ProtoMessage() {} func (m *Capability) GetGracefulRestart() *GracefulRestart { if m != nil { return m.GracefulRestart } return nil } type Path struct { Nlri []byte `protobuf:"bytes,1,opt,name=nlri,proto3" json:"nlri,omitempty"` Pattrs [][]byte `protobuf:"bytes,2,rep,name=pattrs,proto3" json:"pattrs,omitempty"` Age int64 `protobuf:"varint,3,opt,name=age" json:"age,omitempty"` Best bool `protobuf:"varint,4,opt,name=best" json:"best,omitempty"` IsWithdraw bool `protobuf:"varint,5,opt,name=is_withdraw" json:"is_withdraw,omitempty"` Validation int32 `protobuf:"varint,6,opt,name=validation" json:"validation,omitempty"` NoImplicitWithdraw bool `protobuf:"varint,7,opt,name=no_implicit_withdraw" json:"no_implicit_withdraw,omitempty"` Rf uint32 `protobuf:"varint,8,opt,name=rf" json:"rf,omitempty"` } func (m *Path) Reset() { *m = Path{} } func (m *Path) String() string { return proto.CompactTextString(m) } func (*Path) ProtoMessage() {} type Destination struct { Prefix string `protobuf:"bytes,1,opt,name=prefix" json:"prefix,omitempty"` Paths []*Path `protobuf:"bytes,2,rep,name=paths" json:"paths,omitempty"` } func (m *Destination) Reset() { *m = Destination{} } func (m *Destination) String() string { return proto.CompactTextString(m) } func (*Destination) ProtoMessage() {} func (m *Destination) GetPaths() []*Path { if m != nil { return m.Paths } return nil } type PeerConf struct { RemoteIp string `protobuf:"bytes,1,opt,name=remote_ip" json:"remote_ip,omitempty"` Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` RemoteAs uint32 `protobuf:"varint,3,opt,name=remote_as" json:"remote_as,omitempty"` CapRefresh bool `protobuf:"varint,4,opt,name=cap_refresh" json:"cap_refresh,omitempty"` CapEnhancedRefresh bool `protobuf:"varint,5,opt,name=cap_enhanced_refresh" json:"cap_enhanced_refresh,omitempty"` RemoteCap []*Capability `protobuf:"bytes,6,rep,name=remote_cap" json:"remote_cap,omitempty"` LocalCap []*Capability `protobuf:"bytes,7,rep,name=local_cap" json:"local_cap,omitempty"` Holdtime uint32 `protobuf:"varint,8,opt,name=holdtime" json:"holdtime,omitempty"` KeepaliveInterval uint32 `protobuf:"varint,9,opt,name=keepalive_interval" json:"keepalive_interval,omitempty"` } func (m *PeerConf) Reset() { *m = PeerConf{} } func (m *PeerConf) String() string { return proto.CompactTextString(m) } func (*PeerConf) ProtoMessage() {} func (m *PeerConf) GetRemoteCap() []*Capability { if m != nil { return m.RemoteCap } return nil } func (m *PeerConf) GetLocalCap() []*Capability { if m != nil { return m.LocalCap } return nil } type PeerInfo struct { BgpState string `protobuf:"bytes,1,opt,name=bgp_state" json:"bgp_state,omitempty"` AdminState string `protobuf:"bytes,2,opt,name=admin_state" json:"admin_state,omitempty"` FsmEstablishedTransitions uint32 `protobuf:"varint,3,opt,name=fsm_established_transitions" json:"fsm_established_transitions,omitempty"` TotalMessageOut uint64 `protobuf:"varint,4,opt,name=total_message_out" json:"total_message_out,omitempty"` TotalMessageIn uint64 `protobuf:"varint,5,opt,name=total_message_in" json:"total_message_in,omitempty"` UpdateMessageOut uint64 `protobuf:"varint,6,opt,name=update_message_out" json:"update_message_out,omitempty"` UpdateMessageIn uint64 `protobuf:"varint,7,opt,name=update_message_in" json:"update_message_in,omitempty"` KeepAliveMessageOut uint64 `protobuf:"varint,8,opt,name=keep_alive_message_out" json:"keep_alive_message_out,omitempty"` KeepAliveMessageIn uint64 `protobuf:"varint,9,opt,name=keep_alive_message_in" json:"keep_alive_message_in,omitempty"` OpenMessageOut uint64 `protobuf:"varint,10,opt,name=open_message_out" json:"open_message_out,omitempty"` OpenMessageIn uint64 `protobuf:"varint,11,opt,name=open_message_in" json:"open_message_in,omitempty"` NotificationOut uint64 `protobuf:"varint,12,opt,name=notification_out" json:"notification_out,omitempty"` NotificationIn uint64 `protobuf:"varint,13,opt,name=notification_in" json:"notification_in,omitempty"` RefreshMessageOut uint64 `protobuf:"varint,14,opt,name=refresh_message_out" json:"refresh_message_out,omitempty"` RefreshMessageIn uint64 `protobuf:"varint,15,opt,name=refresh_message_in" json:"refresh_message_in,omitempty"` DiscardedOut uint64 `protobuf:"varint,16,opt,name=discarded_out" json:"discarded_out,omitempty"` DiscardedIn uint64 `protobuf:"varint,17,opt,name=discarded_in" json:"discarded_in,omitempty"` Uptime int64 `protobuf:"varint,18,opt,name=uptime" json:"uptime,omitempty"` Downtime int64 `protobuf:"varint,19,opt,name=downtime" json:"downtime,omitempty"` LastError string `protobuf:"bytes,20,opt,name=last_error" json:"last_error,omitempty"` Received uint32 `protobuf:"varint,21,opt,name=received" json:"received,omitempty"` Accepted uint32 `protobuf:"varint,22,opt,name=accepted" json:"accepted,omitempty"` Advertized uint32 `protobuf:"varint,23,opt,name=advertized" json:"advertized,omitempty"` OutQ uint32 `protobuf:"varint,24,opt,name=out_q" json:"out_q,omitempty"` Flops uint32 `protobuf:"varint,25,opt,name=flops" json:"flops,omitempty"` NegotiatedHoldtime uint32 `protobuf:"varint,26,opt,name=negotiated_holdtime" json:"negotiated_holdtime,omitempty"` KeepaliveInterval uint32 `protobuf:"varint,27,opt,name=keepalive_interval" json:"keepalive_interval,omitempty"` } func (m *PeerInfo) Reset() { *m = PeerInfo{} } func (m *PeerInfo) String() string { return proto.CompactTextString(m) } func (*PeerInfo) ProtoMessage() {} type Peer struct { Conf *PeerConf `protobuf:"bytes,1,opt,name=conf" json:"conf,omitempty"` Info *PeerInfo `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` } func (m *Peer) Reset() { *m = Peer{} } func (m *Peer) String() string { return proto.CompactTextString(m) } func (*Peer) ProtoMessage() {} func (m *Peer) GetConf() *PeerConf { if m != nil { return m.Conf } return nil } func (m *Peer) GetInfo() *PeerInfo { if m != nil { return m.Info } return nil } type Prefix struct { IpPrefix string `protobuf:"bytes,1,opt,name=ip_prefix" json:"ip_prefix,omitempty"` MaskLengthRange string `protobuf:"bytes,2,opt,name=mask_length_range" json:"mask_length_range,omitempty"` } func (m *Prefix) Reset() { *m = Prefix{} } func (m *Prefix) String() string { return proto.CompactTextString(m) } func (*Prefix) ProtoMessage() {} type PrefixSet struct { PrefixSetName string `protobuf:"bytes,1,opt,name=prefix_set_name" json:"prefix_set_name,omitempty"` PrefixList []*Prefix `protobuf:"bytes,2,rep,name=prefix_list" json:"prefix_list,omitempty"` MatchSetOptions string `protobuf:"bytes,3,opt,name=match_set_options" json:"match_set_options,omitempty"` } func (m *PrefixSet) Reset() { *m = PrefixSet{} } func (m *PrefixSet) String() string { return proto.CompactTextString(m) } func (*PrefixSet) ProtoMessage() {} func (m *PrefixSet) GetPrefixList() []*Prefix { if m != nil { return m.PrefixList } return nil } type Neighbor struct { Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` } func (m *Neighbor) Reset() { *m = Neighbor{} } func (m *Neighbor) String() string { return proto.CompactTextString(m) } func (*Neighbor) ProtoMessage() {} type NeighborSet struct { NeighborSetName string `protobuf:"bytes,1,opt,name=neighbor_set_name" json:"neighbor_set_name,omitempty"` NeighborList []*Neighbor `protobuf:"bytes,2,rep,name=neighbor_list" json:"neighbor_list,omitempty"` MatchSetOptions string `protobuf:"bytes,3,opt,name=match_set_options" json:"match_set_options,omitempty"` } func (m *NeighborSet) Reset() { *m = NeighborSet{} } func (m *NeighborSet) String() string { return proto.CompactTextString(m) } func (*NeighborSet) ProtoMessage() {} func (m *NeighborSet) GetNeighborList() []*Neighbor { if m != nil { return m.NeighborList } return nil } type AsPathLength struct { Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` Operator string `protobuf:"bytes,2,opt,name=operator" json:"operator,omitempty"` } func (m *AsPathLength) Reset() { *m = AsPathLength{} } func (m *AsPathLength) String() string { return proto.CompactTextString(m) } func (*AsPathLength) ProtoMessage() {} type AsPathSet struct { AsPathSetName string `protobuf:"bytes,1,opt,name=as_path_set_name" json:"as_path_set_name,omitempty"` AsPathMembers []string `protobuf:"bytes,2,rep,name=as_path_members" json:"as_path_members,omitempty"` MatchSetOptions string `protobuf:"bytes,3,opt,name=match_set_options" json:"match_set_options,omitempty"` } func (m *AsPathSet) Reset() { *m = AsPathSet{} } func (m *AsPathSet) String() string { return proto.CompactTextString(m) } func (*AsPathSet) ProtoMessage() {} type CommunitySet struct { CommunitySetName string `protobuf:"bytes,1,opt,name=community_set_name" json:"community_set_name,omitempty"` CommunityMembers []string `protobuf:"bytes,2,rep,name=community_members" json:"community_members,omitempty"` MatchSetOptions string `protobuf:"bytes,3,opt,name=match_set_options" json:"match_set_options,omitempty"` } func (m *CommunitySet) Reset() { *m = CommunitySet{} } func (m *CommunitySet) String() string { return proto.CompactTextString(m) } func (*CommunitySet) ProtoMessage() {} type ExtCommunitySet struct { ExtCommunitySetName string `protobuf:"bytes,1,opt,name=ext_community_set_name" json:"ext_community_set_name,omitempty"` ExtCommunityMembers []string `protobuf:"bytes,2,rep,name=ext_community_members" json:"ext_community_members,omitempty"` MatchSetOptions string `protobuf:"bytes,3,opt,name=match_set_options" json:"match_set_options,omitempty"` } func (m *ExtCommunitySet) Reset() { *m = ExtCommunitySet{} } func (m *ExtCommunitySet) String() string { return proto.CompactTextString(m) } func (*ExtCommunitySet) ProtoMessage() {} type Conditions struct { MatchPrefixSet *PrefixSet `protobuf:"bytes,1,opt,name=match_prefix_set" json:"match_prefix_set,omitempty"` MatchNeighborSet *NeighborSet `protobuf:"bytes,2,opt,name=match_neighbor_set" json:"match_neighbor_set,omitempty"` MatchAsPathLength *AsPathLength `protobuf:"bytes,3,opt,name=match_as_path_length" json:"match_as_path_length,omitempty"` MatchAsPathSet *AsPathSet `protobuf:"bytes,4,opt,name=match_as_path_set" json:"match_as_path_set,omitempty"` MatchCommunitySet *CommunitySet `protobuf:"bytes,5,opt,name=match_community_set" json:"match_community_set,omitempty"` MatchExtCommunitySet *ExtCommunitySet `protobuf:"bytes,6,opt,name=match_ext_community_set" json:"match_ext_community_set,omitempty"` } func (m *Conditions) Reset() { *m = Conditions{} } func (m *Conditions) String() string { return proto.CompactTextString(m) } func (*Conditions) ProtoMessage() {} func (m *Conditions) GetMatchPrefixSet() *PrefixSet { if m != nil { return m.MatchPrefixSet } return nil } func (m *Conditions) GetMatchNeighborSet() *NeighborSet { if m != nil { return m.MatchNeighborSet } return nil } func (m *Conditions) GetMatchAsPathLength() *AsPathLength { if m != nil { return m.MatchAsPathLength } return nil } func (m *Conditions) GetMatchAsPathSet() *AsPathSet { if m != nil { return m.MatchAsPathSet } return nil } func (m *Conditions) GetMatchCommunitySet() *CommunitySet { if m != nil { return m.MatchCommunitySet } return nil } func (m *Conditions) GetMatchExtCommunitySet() *ExtCommunitySet { if m != nil { return m.MatchExtCommunitySet } return nil } type CommunityAction struct { Communities []string `protobuf:"bytes,1,rep,name=communities" json:"communities,omitempty"` Options string `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` } func (m *CommunityAction) Reset() { *m = CommunityAction{} } func (m *CommunityAction) String() string { return proto.CompactTextString(m) } func (*CommunityAction) ProtoMessage() {} type AsPrependAction struct { As string `protobuf:"bytes,1,opt,name=as" json:"as,omitempty"` Repeatn uint32 `protobuf:"varint,2,opt,name=repeatn" json:"repeatn,omitempty"` } func (m *AsPrependAction) Reset() { *m = AsPrependAction{} } func (m *AsPrependAction) String() string { return proto.CompactTextString(m) } func (*AsPrependAction) ProtoMessage() {} type Actions struct { RouteAction string `protobuf:"bytes,1,opt,name=route_action" json:"route_action,omitempty"` Community *CommunityAction `protobuf:"bytes,2,opt,name=community" json:"community,omitempty"` Med string `protobuf:"bytes,3,opt,name=med" json:"med,omitempty"` AsPrepend *AsPrependAction `protobuf:"bytes,4,opt,name=as_prepend" json:"as_prepend,omitempty"` ExtCommunity *CommunityAction `protobuf:"bytes,5,opt,name=ext_community" json:"ext_community,omitempty"` } func (m *Actions) Reset() { *m = Actions{} } func (m *Actions) String() string { return proto.CompactTextString(m) } func (*Actions) ProtoMessage() {} func (m *Actions) GetCommunity() *CommunityAction { if m != nil { return m.Community } return nil } func (m *Actions) GetAsPrepend() *AsPrependAction { if m != nil { return m.AsPrepend } return nil } func (m *Actions) GetExtCommunity() *CommunityAction { if m != nil { return m.ExtCommunity } return nil } type Statement struct { StatementNeme string `protobuf:"bytes,1,opt,name=statement_neme" json:"statement_neme,omitempty"` Conditions *Conditions `protobuf:"bytes,2,opt,name=conditions" json:"conditions,omitempty"` Actions *Actions `protobuf:"bytes,3,opt,name=actions" json:"actions,omitempty"` } func (m *Statement) Reset() { *m = Statement{} } func (m *Statement) String() string { return proto.CompactTextString(m) } func (*Statement) ProtoMessage() {} func (m *Statement) GetConditions() *Conditions { if m != nil { return m.Conditions } return nil } func (m *Statement) GetActions() *Actions { if m != nil { return m.Actions } return nil } type PolicyDefinition struct { PolicyDefinitionName string `protobuf:"bytes,1,opt,name=policy_definition_name" json:"policy_definition_name,omitempty"` StatementList []*Statement `protobuf:"bytes,2,rep,name=statement_list" json:"statement_list,omitempty"` } func (m *PolicyDefinition) Reset() { *m = PolicyDefinition{} } func (m *PolicyDefinition) String() string { return proto.CompactTextString(m) } func (*PolicyDefinition) ProtoMessage() {} func (m *PolicyDefinition) GetStatementList() []*Statement { if m != nil { return m.StatementList } return nil } type ApplyPolicy struct { ImportPolicies []*PolicyDefinition `protobuf:"bytes,1,rep,name=import_policies" json:"import_policies,omitempty"` DefaultImportPolicy string `protobuf:"bytes,2,opt,name=default_import_policy" json:"default_import_policy,omitempty"` ExportPolicies []*PolicyDefinition `protobuf:"bytes,3,rep,name=export_policies" json:"export_policies,omitempty"` DefaultExportPolicy string `protobuf:"bytes,4,opt,name=default_export_policy" json:"default_export_policy,omitempty"` InPolicies []*PolicyDefinition `protobuf:"bytes,5,rep,name=in_policies" json:"in_policies,omitempty"` DefaultInPolicy string `protobuf:"bytes,6,opt,name=default_in_policy" json:"default_in_policy,omitempty"` } func (m *ApplyPolicy) Reset() { *m = ApplyPolicy{} } func (m *ApplyPolicy) String() string { return proto.CompactTextString(m) } func (*ApplyPolicy) ProtoMessage() {} func (m *ApplyPolicy) GetImportPolicies() []*PolicyDefinition { if m != nil { return m.ImportPolicies } return nil } func (m *ApplyPolicy) GetExportPolicies() []*PolicyDefinition { if m != nil { return m.ExportPolicies } return nil } func (m *ApplyPolicy) GetInPolicies() []*PolicyDefinition { if m != nil { return m.InPolicies } return nil } type MrtMessage struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` } func (m *MrtMessage) Reset() { *m = MrtMessage{} } func (m *MrtMessage) String() string { return proto.CompactTextString(m) } func (*MrtMessage) ProtoMessage() {} type ROA struct { As uint32 `protobuf:"varint,1,opt,name=as" json:"as,omitempty"` Prefixlen uint32 `protobuf:"varint,2,opt,name=prefixlen" json:"prefixlen,omitempty"` Maxlen uint32 `protobuf:"varint,3,opt,name=maxlen" json:"maxlen,omitempty"` Prefix string `protobuf:"bytes,4,opt,name=prefix" json:"prefix,omitempty"` } func (m *ROA) Reset() { *m = ROA{} } func (m *ROA) String() string { return proto.CompactTextString(m) } func (*ROA) ProtoMessage() {} type Vrf struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Rd []byte `protobuf:"bytes,2,opt,name=rd,proto3" json:"rd,omitempty"` ImportRt [][]byte `protobuf:"bytes,3,rep,name=import_rt,proto3" json:"import_rt,omitempty"` ExportRt [][]byte `protobuf:"bytes,4,rep,name=export_rt,proto3" json:"export_rt,omitempty"` } func (m *Vrf) Reset() { *m = Vrf{} } func (m *Vrf) String() string { return proto.CompactTextString(m) } func (*Vrf) ProtoMessage() {} func init() { proto.RegisterEnum("api.Resource", Resource_name, Resource_value) proto.RegisterEnum("api.Operation", Operation_name, Operation_value) proto.RegisterEnum("api.BGP_CAPABILITY", BGP_CAPABILITY_name, BGP_CAPABILITY_value) proto.RegisterEnum("api.Error_ErrorCode", Error_ErrorCode_name, Error_ErrorCode_value) } // Client API for Grpc service type GrpcClient interface { GetNeighbors(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetNeighborsClient, error) GetNeighbor(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Peer, error) GetRib(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetRibClient, error) Reset(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) SoftReset(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) SoftResetIn(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) SoftResetOut(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) Shutdown(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) Enable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) Disable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) ModPath(ctx context.Context, opts ...grpc.CallOption) (Grpc_ModPathClient, error) GetNeighborPolicy(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*ApplyPolicy, error) ModNeighborPolicy(ctx context.Context, opts ...grpc.CallOption) (Grpc_ModNeighborPolicyClient, error) GetPolicyRoutePolicies(ctx context.Context, in *PolicyArguments, opts ...grpc.CallOption) (Grpc_GetPolicyRoutePoliciesClient, error) GetPolicyRoutePolicy(ctx context.Context, in *PolicyArguments, opts ...grpc.CallOption) (*PolicyDefinition, error) ModPolicyRoutePolicy(ctx context.Context, opts ...grpc.CallOption) (Grpc_ModPolicyRoutePolicyClient, error) MonitorBestChanged(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_MonitorBestChangedClient, error) MonitorPeerState(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_MonitorPeerStateClient, error) GetMrt(ctx context.Context, in *MrtArguments, opts ...grpc.CallOption) (Grpc_GetMrtClient, error) GetRPKI(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetRPKIClient, error) GetVrfs(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetVrfsClient, error) ModVrf(ctx context.Context, in *ModVrfArguments, opts ...grpc.CallOption) (*Error, error) } type grpcClient struct { cc *grpc.ClientConn } func NewGrpcClient(cc *grpc.ClientConn) GrpcClient { return &grpcClient{cc} } func (c *grpcClient) GetNeighbors(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetNeighborsClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[0], c.cc, "/api.Grpc/GetNeighbors", opts...) if err != nil { return nil, err } x := &grpcGetNeighborsClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetNeighborsClient interface { Recv() (*Peer, error) grpc.ClientStream } type grpcGetNeighborsClient struct { grpc.ClientStream } func (x *grpcGetNeighborsClient) Recv() (*Peer, error) { m := new(Peer) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetNeighbor(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Peer, error) { out := new(Peer) err := grpc.Invoke(ctx, "/api.Grpc/GetNeighbor", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) GetRib(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetRibClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[1], c.cc, "/api.Grpc/GetRib", opts...) if err != nil { return nil, err } x := &grpcGetRibClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetRibClient interface { Recv() (*Destination, error) grpc.ClientStream } type grpcGetRibClient struct { grpc.ClientStream } func (x *grpcGetRibClient) Recv() (*Destination, error) { m := new(Destination) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) Reset(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/Reset", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) SoftReset(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/SoftReset", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) SoftResetIn(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/SoftResetIn", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) SoftResetOut(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/SoftResetOut", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) Shutdown(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/Shutdown", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) Enable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/Enable", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) Disable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/Disable", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) ModPath(ctx context.Context, opts ...grpc.CallOption) (Grpc_ModPathClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[2], c.cc, "/api.Grpc/ModPath", opts...) if err != nil { return nil, err } x := &grpcModPathClient{stream} return x, nil } type Grpc_ModPathClient interface { Send(*ModPathArguments) error CloseAndRecv() (*Error, error) grpc.ClientStream } type grpcModPathClient struct { grpc.ClientStream } func (x *grpcModPathClient) Send(m *ModPathArguments) error { return x.ClientStream.SendMsg(m) } func (x *grpcModPathClient) CloseAndRecv() (*Error, error) { if err := x.ClientStream.CloseSend(); err != nil { return nil, err } m := new(Error) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetNeighborPolicy(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*ApplyPolicy, error) { out := new(ApplyPolicy) err := grpc.Invoke(ctx, "/api.Grpc/GetNeighborPolicy", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) ModNeighborPolicy(ctx context.Context, opts ...grpc.CallOption) (Grpc_ModNeighborPolicyClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[3], c.cc, "/api.Grpc/ModNeighborPolicy", opts...) if err != nil { return nil, err } x := &grpcModNeighborPolicyClient{stream} return x, nil } type Grpc_ModNeighborPolicyClient interface { Send(*PolicyArguments) error Recv() (*Error, error) grpc.ClientStream } type grpcModNeighborPolicyClient struct { grpc.ClientStream } func (x *grpcModNeighborPolicyClient) Send(m *PolicyArguments) error { return x.ClientStream.SendMsg(m) } func (x *grpcModNeighborPolicyClient) Recv() (*Error, error) { m := new(Error) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetPolicyRoutePolicies(ctx context.Context, in *PolicyArguments, opts ...grpc.CallOption) (Grpc_GetPolicyRoutePoliciesClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[4], c.cc, "/api.Grpc/GetPolicyRoutePolicies", opts...) if err != nil { return nil, err } x := &grpcGetPolicyRoutePoliciesClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetPolicyRoutePoliciesClient interface { Recv() (*PolicyDefinition, error) grpc.ClientStream } type grpcGetPolicyRoutePoliciesClient struct { grpc.ClientStream } func (x *grpcGetPolicyRoutePoliciesClient) Recv() (*PolicyDefinition, error) { m := new(PolicyDefinition) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetPolicyRoutePolicy(ctx context.Context, in *PolicyArguments, opts ...grpc.CallOption) (*PolicyDefinition, error) { out := new(PolicyDefinition) err := grpc.Invoke(ctx, "/api.Grpc/GetPolicyRoutePolicy", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *grpcClient) ModPolicyRoutePolicy(ctx context.Context, opts ...grpc.CallOption) (Grpc_ModPolicyRoutePolicyClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[5], c.cc, "/api.Grpc/ModPolicyRoutePolicy", opts...) if err != nil { return nil, err } x := &grpcModPolicyRoutePolicyClient{stream} return x, nil } type Grpc_ModPolicyRoutePolicyClient interface { Send(*PolicyArguments) error Recv() (*Error, error) grpc.ClientStream } type grpcModPolicyRoutePolicyClient struct { grpc.ClientStream } func (x *grpcModPolicyRoutePolicyClient) Send(m *PolicyArguments) error { return x.ClientStream.SendMsg(m) } func (x *grpcModPolicyRoutePolicyClient) Recv() (*Error, error) { m := new(Error) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) MonitorBestChanged(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_MonitorBestChangedClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[6], c.cc, "/api.Grpc/MonitorBestChanged", opts...) if err != nil { return nil, err } x := &grpcMonitorBestChangedClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_MonitorBestChangedClient interface { Recv() (*Destination, error) grpc.ClientStream } type grpcMonitorBestChangedClient struct { grpc.ClientStream } func (x *grpcMonitorBestChangedClient) Recv() (*Destination, error) { m := new(Destination) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) MonitorPeerState(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_MonitorPeerStateClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[7], c.cc, "/api.Grpc/MonitorPeerState", opts...) if err != nil { return nil, err } x := &grpcMonitorPeerStateClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_MonitorPeerStateClient interface { Recv() (*Peer, error) grpc.ClientStream } type grpcMonitorPeerStateClient struct { grpc.ClientStream } func (x *grpcMonitorPeerStateClient) Recv() (*Peer, error) { m := new(Peer) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetMrt(ctx context.Context, in *MrtArguments, opts ...grpc.CallOption) (Grpc_GetMrtClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[8], c.cc, "/api.Grpc/GetMrt", opts...) if err != nil { return nil, err } x := &grpcGetMrtClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetMrtClient interface { Recv() (*MrtMessage, error) grpc.ClientStream } type grpcGetMrtClient struct { grpc.ClientStream } func (x *grpcGetMrtClient) Recv() (*MrtMessage, error) { m := new(MrtMessage) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetRPKI(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetRPKIClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[9], c.cc, "/api.Grpc/GetRPKI", opts...) if err != nil { return nil, err } x := &grpcGetRPKIClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetRPKIClient interface { Recv() (*ROA, error) grpc.ClientStream } type grpcGetRPKIClient struct { grpc.ClientStream } func (x *grpcGetRPKIClient) Recv() (*ROA, error) { m := new(ROA) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) GetVrfs(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (Grpc_GetVrfsClient, error) { stream, err := grpc.NewClientStream(ctx, &_Grpc_serviceDesc.Streams[10], c.cc, "/api.Grpc/GetVrfs", opts...) if err != nil { return nil, err } x := &grpcGetVrfsClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Grpc_GetVrfsClient interface { Recv() (*Vrf, error) grpc.ClientStream } type grpcGetVrfsClient struct { grpc.ClientStream } func (x *grpcGetVrfsClient) Recv() (*Vrf, error) { m := new(Vrf) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *grpcClient) ModVrf(ctx context.Context, in *ModVrfArguments, opts ...grpc.CallOption) (*Error, error) { out := new(Error) err := grpc.Invoke(ctx, "/api.Grpc/ModVrf", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Grpc service type GrpcServer interface { GetNeighbors(*Arguments, Grpc_GetNeighborsServer) error GetNeighbor(context.Context, *Arguments) (*Peer, error) GetRib(*Arguments, Grpc_GetRibServer) error Reset(context.Context, *Arguments) (*Error, error) SoftReset(context.Context, *Arguments) (*Error, error) SoftResetIn(context.Context, *Arguments) (*Error, error) SoftResetOut(context.Context, *Arguments) (*Error, error) Shutdown(context.Context, *Arguments) (*Error, error) Enable(context.Context, *Arguments) (*Error, error) Disable(context.Context, *Arguments) (*Error, error) ModPath(Grpc_ModPathServer) error GetNeighborPolicy(context.Context, *Arguments) (*ApplyPolicy, error) ModNeighborPolicy(Grpc_ModNeighborPolicyServer) error GetPolicyRoutePolicies(*PolicyArguments, Grpc_GetPolicyRoutePoliciesServer) error GetPolicyRoutePolicy(context.Context, *PolicyArguments) (*PolicyDefinition, error) ModPolicyRoutePolicy(Grpc_ModPolicyRoutePolicyServer) error MonitorBestChanged(*Arguments, Grpc_MonitorBestChangedServer) error MonitorPeerState(*Arguments, Grpc_MonitorPeerStateServer) error GetMrt(*MrtArguments, Grpc_GetMrtServer) error GetRPKI(*Arguments, Grpc_GetRPKIServer) error GetVrfs(*Arguments, Grpc_GetVrfsServer) error ModVrf(context.Context, *ModVrfArguments) (*Error, error) } func RegisterGrpcServer(s *grpc.Server, srv GrpcServer) { s.RegisterService(&_Grpc_serviceDesc, srv) } func _Grpc_GetNeighbors_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetNeighbors(m, &grpcGetNeighborsServer{stream}) } type Grpc_GetNeighborsServer interface { Send(*Peer) error grpc.ServerStream } type grpcGetNeighborsServer struct { grpc.ServerStream } func (x *grpcGetNeighborsServer) Send(m *Peer) error { return x.ServerStream.SendMsg(m) } func _Grpc_GetNeighbor_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).GetNeighbor(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_GetRib_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetRib(m, &grpcGetRibServer{stream}) } type Grpc_GetRibServer interface { Send(*Destination) error grpc.ServerStream } type grpcGetRibServer struct { grpc.ServerStream } func (x *grpcGetRibServer) Send(m *Destination) error { return x.ServerStream.SendMsg(m) } func _Grpc_Reset_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).Reset(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_SoftReset_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).SoftReset(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_SoftResetIn_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).SoftResetIn(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_SoftResetOut_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).SoftResetOut(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_Shutdown_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).Shutdown(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_Enable_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).Enable(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_Disable_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).Disable(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_ModPath_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(GrpcServer).ModPath(&grpcModPathServer{stream}) } type Grpc_ModPathServer interface { SendAndClose(*Error) error Recv() (*ModPathArguments, error) grpc.ServerStream } type grpcModPathServer struct { grpc.ServerStream } func (x *grpcModPathServer) SendAndClose(m *Error) error { return x.ServerStream.SendMsg(m) } func (x *grpcModPathServer) Recv() (*ModPathArguments, error) { m := new(ModPathArguments) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _Grpc_GetNeighborPolicy_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(Arguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).GetNeighborPolicy(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_ModNeighborPolicy_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(GrpcServer).ModNeighborPolicy(&grpcModNeighborPolicyServer{stream}) } type Grpc_ModNeighborPolicyServer interface { Send(*Error) error Recv() (*PolicyArguments, error) grpc.ServerStream } type grpcModNeighborPolicyServer struct { grpc.ServerStream } func (x *grpcModNeighborPolicyServer) Send(m *Error) error { return x.ServerStream.SendMsg(m) } func (x *grpcModNeighborPolicyServer) Recv() (*PolicyArguments, error) { m := new(PolicyArguments) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _Grpc_GetPolicyRoutePolicies_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(PolicyArguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetPolicyRoutePolicies(m, &grpcGetPolicyRoutePoliciesServer{stream}) } type Grpc_GetPolicyRoutePoliciesServer interface { Send(*PolicyDefinition) error grpc.ServerStream } type grpcGetPolicyRoutePoliciesServer struct { grpc.ServerStream } func (x *grpcGetPolicyRoutePoliciesServer) Send(m *PolicyDefinition) error { return x.ServerStream.SendMsg(m) } func _Grpc_GetPolicyRoutePolicy_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(PolicyArguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).GetPolicyRoutePolicy(ctx, in) if err != nil { return nil, err } return out, nil } func _Grpc_ModPolicyRoutePolicy_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(GrpcServer).ModPolicyRoutePolicy(&grpcModPolicyRoutePolicyServer{stream}) } type Grpc_ModPolicyRoutePolicyServer interface { Send(*Error) error Recv() (*PolicyArguments, error) grpc.ServerStream } type grpcModPolicyRoutePolicyServer struct { grpc.ServerStream } func (x *grpcModPolicyRoutePolicyServer) Send(m *Error) error { return x.ServerStream.SendMsg(m) } func (x *grpcModPolicyRoutePolicyServer) Recv() (*PolicyArguments, error) { m := new(PolicyArguments) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _Grpc_MonitorBestChanged_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).MonitorBestChanged(m, &grpcMonitorBestChangedServer{stream}) } type Grpc_MonitorBestChangedServer interface { Send(*Destination) error grpc.ServerStream } type grpcMonitorBestChangedServer struct { grpc.ServerStream } func (x *grpcMonitorBestChangedServer) Send(m *Destination) error { return x.ServerStream.SendMsg(m) } func _Grpc_MonitorPeerState_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).MonitorPeerState(m, &grpcMonitorPeerStateServer{stream}) } type Grpc_MonitorPeerStateServer interface { Send(*Peer) error grpc.ServerStream } type grpcMonitorPeerStateServer struct { grpc.ServerStream } func (x *grpcMonitorPeerStateServer) Send(m *Peer) error { return x.ServerStream.SendMsg(m) } func _Grpc_GetMrt_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(MrtArguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetMrt(m, &grpcGetMrtServer{stream}) } type Grpc_GetMrtServer interface { Send(*MrtMessage) error grpc.ServerStream } type grpcGetMrtServer struct { grpc.ServerStream } func (x *grpcGetMrtServer) Send(m *MrtMessage) error { return x.ServerStream.SendMsg(m) } func _Grpc_GetRPKI_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetRPKI(m, &grpcGetRPKIServer{stream}) } type Grpc_GetRPKIServer interface { Send(*ROA) error grpc.ServerStream } type grpcGetRPKIServer struct { grpc.ServerStream } func (x *grpcGetRPKIServer) Send(m *ROA) error { return x.ServerStream.SendMsg(m) } func _Grpc_GetVrfs_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Arguments) if err := stream.RecvMsg(m); err != nil { return err } return srv.(GrpcServer).GetVrfs(m, &grpcGetVrfsServer{stream}) } type Grpc_GetVrfsServer interface { Send(*Vrf) error grpc.ServerStream } type grpcGetVrfsServer struct { grpc.ServerStream } func (x *grpcGetVrfsServer) Send(m *Vrf) error { return x.ServerStream.SendMsg(m) } func _Grpc_ModVrf_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) { in := new(ModVrfArguments) if err := codec.Unmarshal(buf, in); err != nil { return nil, err } out, err := srv.(GrpcServer).ModVrf(ctx, in) if err != nil { return nil, err } return out, nil } var _Grpc_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.Grpc", HandlerType: (*GrpcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetNeighbor", Handler: _Grpc_GetNeighbor_Handler, }, { MethodName: "Reset", Handler: _Grpc_Reset_Handler, }, { MethodName: "SoftReset", Handler: _Grpc_SoftReset_Handler, }, { MethodName: "SoftResetIn", Handler: _Grpc_SoftResetIn_Handler, }, { MethodName: "SoftResetOut", Handler: _Grpc_SoftResetOut_Handler, }, { MethodName: "Shutdown", Handler: _Grpc_Shutdown_Handler, }, { MethodName: "Enable", Handler: _Grpc_Enable_Handler, }, { MethodName: "Disable", Handler: _Grpc_Disable_Handler, }, { MethodName: "GetNeighborPolicy", Handler: _Grpc_GetNeighborPolicy_Handler, }, { MethodName: "GetPolicyRoutePolicy", Handler: _Grpc_GetPolicyRoutePolicy_Handler, }, { MethodName: "ModVrf", Handler: _Grpc_ModVrf_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetNeighbors", Handler: _Grpc_GetNeighbors_Handler, ServerStreams: true, }, { StreamName: "GetRib", Handler: _Grpc_GetRib_Handler, ServerStreams: true, }, { StreamName: "ModPath", Handler: _Grpc_ModPath_Handler, ClientStreams: true, }, { StreamName: "ModNeighborPolicy", Handler: _Grpc_ModNeighborPolicy_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "GetPolicyRoutePolicies", Handler: _Grpc_GetPolicyRoutePolicies_Handler, ServerStreams: true, }, { StreamName: "ModPolicyRoutePolicy", Handler: _Grpc_ModPolicyRoutePolicy_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "MonitorBestChanged", Handler: _Grpc_MonitorBestChanged_Handler, ServerStreams: true, }, { StreamName: "MonitorPeerState", Handler: _Grpc_MonitorPeerState_Handler, ServerStreams: true, }, { StreamName: "GetMrt", Handler: _Grpc_GetMrt_Handler, ServerStreams: true, }, { StreamName: "GetRPKI", Handler: _Grpc_GetRPKI_Handler, ServerStreams: true, }, { StreamName: "GetVrfs", Handler: _Grpc_GetVrfs_Handler, ServerStreams: true, }, }, }