MCPcopy
hub / github.com/google/seesaw / ConfigSource

Method ConfigSource

ecu/control.go:132–154  ·  view source on GitHub ↗

ConfigSource requests the configuration source be changed to the specified source. The name of the original source is returned.

(args *ipc.ConfigSource, oldSource *string)

Source from the content-addressed store, hash-verified

130// ConfigSource requests the configuration source be changed to the specified
131// source. The name of the original source is returned.
132func (s *SeesawECU) ConfigSource(args *ipc.ConfigSource, oldSource *string) error {
133 if args == nil {
134 return errors.New("args is nil")
135 }
136 ctx := args.Ctx
137 s.trace("ConfigSource", ctx)
138
139 authConn, err := s.ecu.authConnect(ctx)
140 if err != nil {
141 return err
142 }
143 defer authConn.Close()
144
145 source, err := authConn.ConfigSource(args.Source)
146 if err != nil {
147 return err
148 }
149
150 if oldSource != nil {
151 *oldSource = source
152 }
153 return nil
154}
155
156// BGPNeighbors returns a list of the BGP neighbors that we are peering with.
157func (s *SeesawECU) BGPNeighbors(ctx *ipc.Context, reply *quagga.Neighbors) error {

Callers

nothing calls this directly

Calls 4

traceMethod · 0.95
authConnectMethod · 0.80
CloseMethod · 0.65
ConfigSourceMethod · 0.65

Tested by

no test coverage detected